diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-26 21:09:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-26 21:09:23 +0000 |
commit | e8a1bf340e109f6e19ceb284ca4c10a444c2590b (patch) | |
tree | b37bd9576b1d3a39c07823d78f58f024416fe8a3 /Master/texmf-dist/scripts/l3build | |
parent | 50ad4a1b03a5cb49b4e3afd5dc983f163e07fe55 (diff) |
l3build (26feb23)
git-svn-id: svn://tug.org/texlive/trunk@66191 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/l3build')
5 files changed, 32 insertions, 27 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-arguments.lua b/Master/texmf-dist/scripts/l3build/l3build-arguments.lua index 49c80a75966..76b661e26c6 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-arguments.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-arguments.lua @@ -291,16 +291,16 @@ end options = argparse() -- Sanity check -function check_engines() +function check_engines(config) if options["engine"] and not options["force"] then - -- Make a lookup table - local t = { } + -- Make a lookup table + local t = { } for _, engine in pairs(checkengines) do t[engine] = true end for _, engine in pairs(options["engine"]) do if not t[engine] then - print("\n! Error: Engine \"" .. engine .. "\" not set up for testing!") + print("\n! Error: Engine \"" .. engine .. "\" not set up for testing with configuration " .. config .. "!") print("\n Valid values are:") for _, engine in ipairs(checkengines) do print(" - " .. engine) diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index b77a7e26cc4..8c3afa4a7e1 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -791,7 +791,7 @@ function runtest(name, engine, hide, ext, test_type, breakout) .. (checksearch and os_pathsep or "") .. os_concat .. -- ensure epoch settings - set_epoch_cmd(epoch, forcecheckepoch) .. + set_epoch_cmd(epoch, forcecheckepoch) .. -- Ensure lines are of a known length os_setenv .. " max_print_line=" .. maxprintline .. os_concat .. diff --git a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua index 7f5327b5a26..2a7dbad510f 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-typesetting.lua @@ -57,10 +57,11 @@ end function dvitopdf(name, dir, engine, hide) runcmd( + set_epoch_cmd(epoch, forcecheckepoch) .. "dvips " .. name .. dviext .. (hide and (" > " .. os_null) or "") .. os_concat .. - "ps2pdf " .. ps2pdfopt .. name .. psext + "ps2pdf " .. ps2pdfopts .. name .. psext .. (hide and (" > " .. os_null) or ""), dir ) diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua index 51f927019ad..ce07d1f8159 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua @@ -193,7 +193,8 @@ if flattentds == nil then end maxprintline = maxprintline or 79 packtdszip = packtdszip or false -ps2pdfopt = ps2pdfopt or "" +-- support "ps2pdfopt" for backward compatibility, gh issue #275 +ps2pdfopts = ps2pdfopts or ps2pdfopt or "" typesetcmds = typesetcmds or "" typesetruns = typesetruns or 3 recordstatus = recordstatus or false diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index ff80523b174..0aead12f956 100755 --- a/Master/texmf-dist/scripts/l3build/l3build.lua +++ b/Master/texmf-dist/scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2023-02-20" +release_date = "2023-02-26" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") @@ -118,17 +118,14 @@ if options["epoch"] then end epoch = normalise_epoch(epoch) --- Sanity check -check_engines() - -- -- Deal with multiple configs for tests -- -- When we have specific files to deal with, only use explicit configs --- (or just the std one) +-- (or just the default one) if options["names"] then - checkconfigs = options["config"] or {stdconfig} + checkconfigs = options["config"] or {"build"} else checkconfigs = options["config"] or checkconfigs end @@ -205,22 +202,28 @@ if #checkconfigs > 1 then end end if #checkconfigs == 1 and - checkconfigs[1] ~= "build" and (options["target"] == "check" or options["target"] == "save" or options["target"] == "clean") then - local configname = gsub(checkconfigs[1], "%.lua$", "") - local config = "./" .. configname .. ".lua" - if fileexists(config) then - local savedtestfiledir = testfiledir - dofile(config) - testdir = testdir .. "-" .. configname - -- Reset testsuppdir if required - if savedtestfiledir ~= testfiledir and - testsuppdir == savedtestfiledir .. "/support" then - testsuppdir = testfiledir .. "/support" - end + if checkconfigs[1] == "build" then + -- Sanity check for default config + check_engines("build.lua") else - print("Error: Cannot find configuration " .. checkconfigs[1]) - exit(1) + local configname = gsub(checkconfigs[1], "%.lua$", "") + local config = "./" .. configname .. ".lua" + if fileexists(config) then + local savedtestfiledir = testfiledir + dofile(config) + -- Sanity check for non-default config + check_engines(configname .. ".lua") + testdir = testdir .. "-" .. configname + -- Reset testsuppdir if required + if savedtestfiledir ~= testfiledir and + testsuppdir == savedtestfiledir .. "/support" then + testsuppdir = testfiledir .. "/support" + end + else + print("Error: Cannot find configuration " .. configname .. ".lua") + exit(1) + end end end |