[latex3-commits] [git/LaTeX3-latex3-l3build] regenerate: Summarize rebuild/recheck cmds for all configs (9045714)
Marcel Fabian Krüger
tex at 2krueger.de
Thu May 27 02:52:46 CEST 2021
Repository : https://github.com/latex3/l3build
On branch : regenerate
Link : https://github.com/latex3/l3build/commit/90457143ccd5a84f25dcb31d7ebb83443e61d8db
>---------------------------------------------------------------
commit 90457143ccd5a84f25dcb31d7ebb83443e61d8db
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
>---------------------------------------------------------------
90457143ccd5a84f25dcb31d7ebb83443e61d8db
l3build-check.lua | 5 +++++
l3build.lua | 31 +++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/l3build-check.lua b/l3build-check.lua
index e708220..6ec4346 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.