summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3build
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-13 03:03:57 +0000
committerNorbert Preining <norbert@preining.info>2023-12-13 03:03:57 +0000
commitf914c275329785103a123c35a5d1e5db321c7adf (patch)
tree5604540f88ec03a34cd82aa99707ae77dfdd41e0 /macros/latex/contrib/l3build
parent20d530d28645a91e4362d87f1b7559a67cfd0e31 (diff)
CTAN sync 202312130303
Diffstat (limited to 'macros/latex/contrib/l3build')
-rw-r--r--macros/latex/contrib/l3build/CHANGELOG.md14
-rw-r--r--macros/latex/contrib/l3build/README.md2
-rw-r--r--macros/latex/contrib/l3build/l3build-check.lua74
-rw-r--r--macros/latex/contrib/l3build/l3build.12
-rw-r--r--macros/latex/contrib/l3build/l3build.dtx43
-rwxr-xr-xmacros/latex/contrib/l3build/l3build.lua19
-rw-r--r--macros/latex/contrib/l3build/l3build.pdfbin746427 -> 747893 bytes
7 files changed, 93 insertions, 61 deletions
diff --git a/macros/latex/contrib/l3build/CHANGELOG.md b/macros/latex/contrib/l3build/CHANGELOG.md
index 6b6e1c7f16..ba6b1deae5 100644
--- a/macros/latex/contrib/l3build/CHANGELOG.md
+++ b/macros/latex/contrib/l3build/CHANGELOG.md
@@ -7,6 +7,17 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2023-12-12]
+
+### Changed
+- Document default value of `ctanpkg` as a valid lua expression
+- Improve log for failed checks with no diff files
+- Document full syntaxes of `\SHOWFILE` and `\ASSERT(STR)`
+
+### Fixed
+- Short-circuit `check --rerun` if `testdir` doesn't exist
+- Retain errorlevel on Windows during `check` target
+
## [2023-11-01]
### Changed
@@ -721,7 +732,8 @@ this project uses date-based 'snapshot' version identifiers.
- Rationalise short option names: removed `-d`, `-E`, `-r`
- Target `cmdcheck`: specific to LaTeX kernel work
-[Unreleased]: https://github.com/latex3/l3build/compare/2023-11-01...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2023-12-12...HEAD
+[2023-12-12]: https://github.com/latex3/l3build/compare/2023-11-01...2023-12-12
[2023-11-01]: https://github.com/latex3/l3build/compare/2023-09-13...2023-11-01
[2023-09-13]: https://github.com/latex3/l3build/compare/2023-09-07...2023-09-13
[2023-09-07]: https://github.com/latex3/l3build/compare/2023-09-05...2023-09-07
diff --git a/macros/latex/contrib/l3build/README.md b/macros/latex/contrib/l3build/README.md
index 7288867655..55b22f6808 100644
--- a/macros/latex/contrib/l3build/README.md
+++ b/macros/latex/contrib/l3build/README.md
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX
=================================================
-Release 2023-11-01
+Release 2023-12-12
Overview
--------
diff --git a/macros/latex/contrib/l3build/l3build-check.lua b/macros/latex/contrib/l3build/l3build-check.lua
index 3279f2c4a1..75e2fc2bcf 100644
--- a/macros/latex/contrib/l3build/l3build-check.lua
+++ b/macros/latex/contrib/l3build/l3build-check.lua
@@ -799,29 +799,37 @@ function runtest(name, engine, hide, ext, test_type, breakout)
-- Ensure there is no stray .log file
rmfile(testdir,name .. logext)
local errlevels = {}
+ local preamble =
+ -- No use of localdir here as the files get copied to testdir:
+ -- avoids any paths in the logs
+ os_setenv .. " TEXINPUTS=." .. localtexmf()
+ .. (checksearch and os_pathsep or "")
+ .. os_concat ..
+ os_setenv .. " LUAINPUTS=." .. localtexmf()
+ .. (checksearch and os_pathsep or "")
+ .. os_concat ..
+ -- ensure epoch settings
+ set_epoch_cmd(epoch, forcecheckepoch) ..
+ -- Ensure lines are of a known length
+ os_setenv .. " max_print_line=" .. maxprintline
+ .. os_concat
for i = 1, checkruns do
errlevels[i] = runcmd(
- -- No use of localdir here as the files get copied to testdir:
- -- avoids any paths in the logs
- os_setenv .. " TEXINPUTS=." .. localtexmf()
- .. (checksearch and os_pathsep or "")
- .. os_concat ..
- os_setenv .. " LUAINPUTS=." .. localtexmf()
- .. (checksearch and os_pathsep or "")
- .. os_concat ..
- -- ensure epoch settings
- set_epoch_cmd(epoch, forcecheckepoch) ..
- -- Ensure lines are of a known length
- os_setenv .. " max_print_line=" .. maxprintline
- .. os_concat ..
+ preamble ..
binary .. format
.. " " .. asciiopt .. " " .. checkopts
.. setup(lvtfile)
- .. (hide and (" > " .. os_null) or "")
- .. os_concat ..
- runtest_tasks(jobname(lvtfile),i),
+ .. (hide and (" > " .. os_null) or ""),
testdir
)
+ -- On Windows, concatenting here will suppress any non-zero errorlevel
+ -- from the main run, so we split into two parts.
+ if errlevels[i] == 0 then
+ local errorlevel =
+ runcmd(preamble .. runtest_tasks(jobname(lvtfile),i)
+ .. (hide and (" > " .. os_null) or ""),testdir)
+ if errorlevel ~= 0 then errlevels[i] = errorlevel end
+ end
-- Break the loop if the result is stable
if breakout and i < checkruns then
if test_type.generated == pdfext then
@@ -926,7 +934,13 @@ end
function check(names)
local errorlevel = 0
if testfiledir ~= "" and direxists(testfiledir) then
- if not options["rerun"] then
+ if options["rerun"] then
+ if not direxists(testdir) then
+ print("\n Test directory \"" .. testdir .. "\" doesn't exist.")
+ print(" Try again without \"--rerun\".\n")
+ return 1
+ end
+ else
errorlevel = checkinit()
if errorlevel ~= 0 then
return errorlevel
@@ -1031,7 +1045,7 @@ function check(names)
end
end
if errorlevel ~= 0 then
- checkdiff()
+ checkdiff() -- this leaves "config" parameter of "checkdiff()" nil
if options["show-saves"] then
showsavecommands(failurelist)
end
@@ -1043,10 +1057,26 @@ function check(names)
end
-- A short auxiliary to print the list of differences for check
-function checkdiff()
- print("\n Check failed with difference files")
- for _,i in ipairs(ordered_filelist(testdir, "*" .. os_diffext)) do
- print(" - " .. testdir .. "/" .. i)
+function checkdiff(config)
+ local diff_files = ordered_filelist(testdir, "*" .. os_diffext)
+ if next(diff_files) then
+ if config then
+ print("Failed tests for configuration \"" .. config .. "\":")
+ local testdir = testdir
+ if config ~= "build" then
+ testdir = testdir .. "-" .. config
+ end
+ end
+ print("\n Check failed with difference files")
+ for _,i in ipairs(diff_files) do
+ print(" - " .. testdir .. "/" .. i)
+ end
+ else
+ if config then
+ print("Check failed for configuration \"" .. config .. "\" with no difference files.")
+ else
+ print("Check failed with no difference files.")
+ end
end
print("")
end
diff --git a/macros/latex/contrib/l3build/l3build.1 b/macros/latex/contrib/l3build/l3build.1
index 0ff6254515..da81ed4d26 100644
--- a/macros/latex/contrib/l3build/l3build.1
+++ b/macros/latex/contrib/l3build/l3build.1
@@ -1,4 +1,4 @@
-.TH l3build 1 "2023-11-01"
+.TH l3build 1 "2023-12-12"
.SH NAME
l3build \- Checking and building packages
.SH SYNOPSIS
diff --git a/macros/latex/contrib/l3build/l3build.dtx b/macros/latex/contrib/l3build/l3build.dtx
index e425786e03..444f6f8679 100644
--- a/macros/latex/contrib/l3build/l3build.dtx
+++ b/macros/latex/contrib/l3build/l3build.dtx
@@ -52,10 +52,10 @@
\def\allluavars{
\luavarset{module}{""}{The name of the module}
\luavarset{bundle}{""}{The name of the bundle in which the module belongs (where relevant)}
-\luavarset{ctanpkg}{module/bundle}{Name of the CTAN package matching this module}
+\luavarset{ctanpkg}{bundle == "" and module or bundle}{Name of the CTAN package matching this module}
\luavarseparator
-\luavarset{modules}{\{\}}{The list of all modules in a bundle (when not auto-detecting)}
-\luavarset{exclmodules}{\{\}}{Directories to be excluded from automatic module detection}
+\luavarset{modules}{\{ \}}{The list of all modules in a bundle (when not auto-detecting)}
+\luavarset{exclmodules}{\{ \}}{Directories to be excluded from automatic module detection}
\luavarseparator
\luavarset{maindir} {"."} {Top level directory for the module/bundle}
\luavarset{docfiledir} {"."} {Directory containing documentation files}
@@ -85,8 +85,8 @@
\luavarset{checkfiles} {\{~\}}{Extra files unpacked purely for tests}
\luavarset{checksuppfiles} { }{Files needed for performing regression tests}
\luavarset{cleanfiles} {\{"*.log", "*.pdf", "*.zip"\}}{Files to delete when cleaning}
-\luavarset{demofiles} {\{\}}{Files which show how to use a module}
-\luavarset{docfiles} {\{\}}{Files which are part of the documentation but should not be typeset}
+\luavarset{demofiles} {\{ \}}{Files which show how to use a module}
+\luavarset{docfiles} {\{ \}}{Files which are part of the documentation but should not be typeset}
\luavarset{dynamicfiles} {\{ \}}{Secondary files to cleared before each test is run}
\luavarset{excludefiles} {\{"*\string~","build.lua","config-*.lua"\}}{Files to ignore entirely (default for Emacs backup files)}
\luavarset{installfiles} {\{"*.sty","*.cls"\}}{Files to install to the \texttt{tex} area of the \texttt{texmf} tree}
@@ -96,19 +96,19 @@
\luavarset{sourcefiles} {\{"*.dtx", "*.ins", "*-????-??-??.sty"\}}{Files to copy for unpacking}
\luavarset{tagfiles} {\{"*.dtx"\}}{Files for automatic tagging}
\luavarset{textfiles} {\{"*.md", "*.txt"\}}{Plain text files to send to CTAN as-is}
-\luavarset{typesetdemofiles} {\{\}}{Files to typeset before the documentation for inclusion in main documentation files}
+\luavarset{typesetdemofiles} {\{ \}}{Files to typeset before the documentation for inclusion in main documentation files}
\luavarset{typesetfiles} {\{"*.dtx"\}}{Files to typeset for documentation}
-\luavarset{typesetsuppfiles} {\{\}}{Files needed to support typesetting when \enquote{sandboxed}}
-\luavarset{typesetsourcefiles}{\{\}}{Files to copy to unpacking when typesetting}
+\luavarset{typesetsuppfiles} {\{ \}}{Files needed to support typesetting when \enquote{sandboxed}}
+\luavarset{typesetsourcefiles}{\{ \}}{Files to copy to unpacking when typesetting}
\luavarset{unpackfiles} {\{"*.ins"\}}{Files to run to perform unpacking}
-\luavarset{unpacksuppfiles} {\{\}}{Files needed to support unpacking when \enquote{sandboxed}}
+\luavarset{unpacksuppfiles} {\{ \}}{Files needed to support unpacking when \enquote{sandboxed}}
\luavarseparator
\luavarset{includetests}{\{"*"\}}{Test names to include when checking}
-\luavarset{excludetests}{\{\}} {Test names to exclude when checking}
+\luavarset{excludetests}{\{ \}} {Test names to exclude when checking}
\luavarseparator
-\luavarset{checkdeps} {\{\}}{List of dependencies for running checks}
-\luavarset{typesetdeps}{\{\}}{List of dependencies for typesetting docs}
-\luavarset{unpackdeps} {\{\}}{List of dependencies for unpacking}
+\luavarset{checkdeps} {\{ \}}{List of dependencies for running checks}
+\luavarset{typesetdeps}{\{ \}}{List of dependencies for typesetting docs}
+\luavarset{unpackdeps} {\{ \}}{List of dependencies for unpacking}
\luavarseparator
\luavarset{checkengines}{\{"pdftex", "xetex", "luatex"\}}{Engines to check with \texttt{check} by default}
\luavarset{stdengine} {checkengines[1] or "pdftex"}{Engine to generate \texttt{.tlg} file from}
@@ -117,7 +117,7 @@
\luavarset{\detokenize{test_types}} {\meta{table}} {Custom test variants}
\luavarset{\detokenize{test_order}} {\{"log", "pdf"\}} {Which kinds of tests to evaluate}
\luavarseparator
-\luavarset{checkconfigs}{\{\}}{Configurations to use for tests}
+\luavarset{checkconfigs}{\{ \}}{Configurations to use for tests}
\luavarseparator
\luavarset{typesetexe} {"pdflatex"} {Executable for compiling \texttt{doc(s)}}
\luavarset{unpackexe} {"pdftex"} {Executable for running \texttt{unpack}}
@@ -190,7 +190,7 @@
\setlength\LTleft{-0.21\linewidth}
\begin{longtable}{@{}%
>{\small}
- p{0.18\linewidth}
+ p{0.20\linewidth}
@{\hspace{0.03\linewidth}}
>{\footnotesize\hangindent=1em}
p{0.34\linewidth}
@@ -251,7 +251,7 @@
% }^^A
% }
%
-% \date{Released 2023-11-01}
+% \date{Released 2023-12-12}
%
% \maketitle
% \tableofcontents
@@ -977,12 +977,13 @@
% \cs{BEGINTEST}\marg{title} \dots \cs{ENDTEST} is an environment form of
% \cs{TEST}, allowing verbatim material, \emph{etc.} to appear.
% \item
-% \cs{SHOWFILE} (\eTeX{} only) Shows the content of the file given as an
-% argument.
+% \cs{SHOWFILE}\marg{filename} (\eTeX{} only) Shows the content of
+% \meta{filename}.
% \item
-% \cs{ASSERT} and \cs{ASSERTSTR} Asserts if the full expansion
-% of the two required arguments are the same: the \cs{ASSERT} function is
-% token-based, the \cs{ASSERTSTR} works on a string basis.
+% \cs{ASSERT}\marg{arg_1}\marg{arg_2} and \cs{ASSERTSTR}\marg{arg_1}\marg{arg_2}
+% Asserts if the full expansion of \meta{arg_1} and \meta{arg_2} are the same:
+% the \cs{ASSERT} function is token-based,
+% the \cs{ASSERTSTR} works on a string basis.
% \end{itemize}
% An example of some of these commands is shown following.
% \begin{Verbatim}
diff --git a/macros/latex/contrib/l3build/l3build.lua b/macros/latex/contrib/l3build/l3build.lua
index cf8f66cc1f..4919d9377f 100755
--- a/macros/latex/contrib/l3build/l3build.lua
+++ b/macros/latex/contrib/l3build/l3build.lua
@@ -1,5 +1,3 @@
-#!/usr/bin/env texlua
-
--[[
File l3build.lua Copyright (C) 2014-2022 The LaTeX Project
@@ -25,7 +23,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2023-11-01"
+release_date = "2023-12-12"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
@@ -165,16 +163,7 @@ if #checkconfigs > 1 then
end
if next(failed) then
for _,config in ipairs(failed) do
- print("Failed tests for configuration \"" .. config .. "\":")
- print("\n Check failed with difference files")
- local testdir = testdir
- if config ~= "build" then
- testdir = testdir .. "-" .. config
- end
- for _,i in ipairs(ordered_filelist(testdir,"*" .. os_diffext)) do
- print(" - " .. testdir .. "/" .. i)
- end
- print("")
+ checkdiff(config)
end
if options["show-saves"] then
local savecmds, recheckcmds = "", ""
@@ -200,8 +189,8 @@ if #checkconfigs > 1 then
end
print"To regenerate the test files, run\n"
print(savecmds)
- if recheckcmds ~= "" then
- print"To detect engine specific differences, run after that\n"
+ if recheckcmds ~= "" and #checkengines ~= 1 then
+ print"To detect engine-specific differences, run after that\n"
print(recheckcmds)
end
end
diff --git a/macros/latex/contrib/l3build/l3build.pdf b/macros/latex/contrib/l3build/l3build.pdf
index fdd536d4ac..e6d9b9f1a4 100644
--- a/macros/latex/contrib/l3build/l3build.pdf
+++ b/macros/latex/contrib/l3build/l3build.pdf
Binary files differ