[latex3-commits] [git/LaTeX3-latex3-l3build] main, regenerate: Only show l3build save cmds when requested (cd85894)

Marcel Fabian Krüger tex at 2krueger.de
Mon Jun 28 18:04:01 CEST 2021


Repository : https://github.com/latex3/l3build
On branches: main,regenerate
Link       : https://github.com/latex3/l3build/commit/cd8589487c84f83074f2963f0bb1c48eeaf39e6d

>---------------------------------------------------------------

commit cd8589487c84f83074f2963f0bb1c48eeaf39e6d
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu May 20 16:34:27 2021 +0200

    Only show l3build save cmds when requested


>---------------------------------------------------------------

cd8589487c84f83074f2963f0bb1c48eeaf39e6d
 l3build-arguments.lua | 5 +++++
 l3build-check.lua     | 4 +++-
 l3build.dtx           | 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/l3build-arguments.lua b/l3build-arguments.lua
index 80f19d6..cc921f9 100644
--- a/l3build-arguments.lua
+++ b/l3build-arguments.lua
@@ -139,6 +139,11 @@ option_list =
         desc  = "If 'halt-on-error' stops, show the full log of the failure",
         type  = "boolean"
       },
+    ["show-save-cmds"] =
+      {
+        desc  = "If tests fail, show the l3build save invocation to regenerate the tests",
+        type  = "boolean"
+      },
     shuffle =
       {
         desc  = "Shuffle order of tests",
diff --git a/l3build-check.lua b/l3build-check.lua
index b6df84a..d17507e 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -962,7 +962,9 @@ function check(names)
     end
     if errorlevel ~= 0 then
       checkdiff()
-      showsavecommands(failurelist)
+      if options["show-save-cmds"] then
+        showsavecommands(failurelist)
+      end
     else
       print("\n  All checks passed\n")
     end
diff --git a/l3build.dtx b/l3build.dtx
index 5171f10..fc1d1ed 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -379,6 +379,8 @@
 % \item |--rerun| Run tests without unpacking/set up
 % \item |--show-log-on-error| To be used in addition to \texttt{--halt-on-error} and results
 %   in the full \texttt{.log} file of a failed test to be shown on the console
+% \item |--show-save-cmds| When tests fail, print the \texttt{l3build save} commands needed
+%   to regenerate the tests assuming that the failures were false negatives.
 % \item |--shuffle| Shuffle the order in which tests run
 % \item |--texmfhome| Sets the location of the user tree for installing
 % \end{itemize}





More information about the latex3-commits mailing list.