[latex3-commits] [git/LaTeX3-latex3-l3build] main, regenerate: Summarize rebuild/recheck cmds for all configs (94e49a9)
Marcel Fabian Krüger
tex at 2krueger.de
Mon Jun 28 18:06:25 CEST 2021
Repository : https://github.com/latex3/l3build
On branches: main,regenerate
Link : https://github.com/latex3/l3build/commit/94e49a9d432e107450cb766fbbf91aef7cdd91b2
>---------------------------------------------------------------
commit 94e49a9d432e107450cb766fbbf91aef7cdd91b2
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Thu May 27 02:52:46 2021 +0200
Summarize rebuild/recheck cmds for all configs
>---------------------------------------------------------------
94e49a9d432e107450cb766fbbf91aef7cdd91b2
l3build-check.lua | 5 +++++
l3build.lua | 31 +++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/l3build-check.lua b/l3build-check.lua
index 0427032..1ab3c8f 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -1009,13 +1009,18 @@ function showsavecommands(failurelist)
end
end
print(" To regenerate the test files, run\n")
+ local f = open(testdir .. "/.savecommands", "w")
for _, cmds in pairs(savecmds) do
print(" " .. cmds)
+ f:write(cmds, "\n")
end
+ f:write"\n"
if hascheckcmd then
print("\n Afterwards test for engine specific changes using\n")
print(" " .. checkcmd)
+ f:write(checkcmd)
end
+ f:close()
print("")
end
diff --git a/l3build.lua b/l3build.lua
index 8299439..c97c679 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -43,6 +43,8 @@ local print = print
local select = select
local tonumber = tonumber
local exit = os.exit
+local open = io.open
+local stdout = io.stdout
-- l3build setup and functions
kpse.set_program_name("kpsewhich")
@@ -160,6 +162,35 @@ if options["target"] == "check" then
end
print("")
end
+ if options["show-save-cmds"] then
+ local savecmds, recheckcmds = "", ""
+ for _,config in ipairs(failed) do
+ local testdir = testdir
+ if config ~= "build" then
+ testdir = testdir .. "-" .. config
+ end
+ local f = open(testdir .. "/.savecommands")
+ if not f then
+ print("Error: Cannot find save commands for configuration " ..
+ config)
+ exit(2)
+ end
+ for line in f:lines() do
+ if line == "" then break end
+ savecmds = savecmds .. " " .. line .. "\n"
+ end
+ for line in f:lines() do
+ recheckcmds = recheckcmds .. " " .. line .. "\n"
+ end
+ f:close()
+ end
+ print"To regenerate the test files, run\n"
+ print(savecmds)
+ if recheckcmds ~= "" then
+ print"To detect engine specific differences, run after that\n"
+ print(recheckcmds)
+ end
+ end
exit(1)
else
-- Avoid running the 'main' set of tests twice
More information about the latex3-commits
mailing list.