Skip to content

Changing lvtext in non-default configs does not work #403

@muzimuzhi

Description

@muzimuzhi

If lvtext is only changed in a non-default config (for example, lvtext = ".tex"), then the new lvtext is never used when checking with config.

Use this repository as an example,

  1. add lvtext = ".tex" to config-plain.lua and an empty test.tex to ./testfiles-plain
  2. run either l3build check -q or l3build check -cconfig-plain -q and see test.tex is not checked, and the *.lvt tests in ./testfiles-plain are still being checked.
$ l3build check -q -cconfig-plain
Running checks on
  plain-pdftex (1/1)
(guessed encoding #3: ASCII = utf8)(guessed encoding #5: ASCII = utf8)(guessed encoding #6: ASCII = utf8)

The cause is, the values of lvtext and other ...ext variables are stored in and in latter uses retrieved from table test_types, which is only set once in l3build-variables.lua, and not updated after a non-default config is loaded by l3build.lua (see line 227 in l3build.lua snippet below, dofile(config)).

test_types = test_types or { }
test_types.log = test_types.log or {
test = lvtext,
generated = logext,
reference = tlgext,
expectation = lveext,
compare = compare_tlg,
rewrite = rewrite_log,
}
test_types.pdf = test_types.pdf or {
test = pvtext,
generated = pdfext,
reference = tpfext,
rewrite = rewrite_pdf,
}

l3build/l3build.lua

Lines 225 to 229 in f757458

if fileexists(config) then
local savedtestfiledir = testfiledir
dofile(config)
-- Sanity check for non-default config
check_engines(configname .. ".lua")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions