From 4acb20c1a6e924f09bc31b3cd0447e2f3628abda Mon Sep 17 00:00:00 2001 From: LogCreative Date: Tue, 16 Jan 2024 12:25:45 +0800 Subject: [PATCH] ci: two run config --- build.lua | 14 ++++++++++++-- testfiles/tworuns/config.lua | 2 ++ testfiles/tworuns/hyperref.lvt | 12 ++++++++++++ testfiles/tworuns/hyperref.tlg | 5 +++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 testfiles/tworuns/config.lua create mode 100644 testfiles/tworuns/hyperref.lvt create mode 100644 testfiles/tworuns/hyperref.tlg diff --git a/build.lua b/build.lua index 98024f5..61b925a 100644 --- a/build.lua +++ b/build.lua @@ -14,8 +14,6 @@ sourcefiledir = "texmf/source/latex/" .. module -- l3build check -- Checking will copy the unpack files to the final directory. -testfiledir = "testfiles" -testsuppdir = testfiledir .. "/support" installfiles = {"*.sty", "*.cls"} extraunpackdir = "texmf/tex/latex/" .. module function checkinit_hook() @@ -25,8 +23,20 @@ function checkinit_hook() return 0 end +-- main check config +checkruns = 1 +testfiledir = "testfiles" +testsuppdir = testfiledir .. "/support" + +-- extra check configs +checkconfigs = { + "build", + "testfiles/tworuns/config" +} + -- l3build doc -- prepare the test pdf in the doc (should be done after 'l3build check') +-- only main folder check could be included maindir = "." builddir = maindir .. "/build" testdir = builddir .. "/test" diff --git a/testfiles/tworuns/config.lua b/testfiles/tworuns/config.lua new file mode 100644 index 0000000..88cef85 --- /dev/null +++ b/testfiles/tworuns/config.lua @@ -0,0 +1,2 @@ +checkruns = 2 +testfiledir = "testfiles/tworuns" diff --git a/testfiles/tworuns/hyperref.lvt b/testfiles/tworuns/hyperref.lvt new file mode 100644 index 0000000..4d37378 --- /dev/null +++ b/testfiles/tworuns/hyperref.lvt @@ -0,0 +1,12 @@ +\input{regression-test} +\AtBeginDocument{\START} +\DocumentMetadata{} +\documentclass{presenter} +\usepackage{hyperref} +\begin{document} +\section{Test} +Test \textsf{hyperref} on Page \pageref{sec:target}. + +\section{Target}\label{sec:target} +This is the target section. +\end{document} \ No newline at end of file diff --git a/testfiles/tworuns/hyperref.tlg b/testfiles/tworuns/hyperref.tlg new file mode 100644 index 0000000..38d4d7b --- /dev/null +++ b/testfiles/tworuns/hyperref.tlg @@ -0,0 +1,5 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +[1 +] [2 +] (hyperref.aux)