handle old versions of latexmk in run count extraction (#30597)

* handle old versions of latexmk in run count extraction

the log lines for the run number change from stderr to stdout in TL2022

* extend SimpleLatexFileTest to include TL2017

* reset metrics for each scenario in SimpleLatexFileTests

* fix buildscript merge conflict

GitOrigin-RevId: fb74f2025d21ddf43be6a3b90ac6f7df4d975db6
This commit is contained in:
Brian Gough
2026-03-19 07:10:16 +00:00
committed by Copybot
parent 6915989ce5
commit 9f1e4d99e5
5 changed files with 34 additions and 6 deletions

View File

@@ -87,7 +87,9 @@ function runLatex(projectId, options, callback) {
}
// number of latex runs and whether there were errors
const runs =
output?.stdout?.match(/^Run number \d+ of .*latex/gm)?.length || 0
output?.stdout?.match(/^Run number \d+ of .*latex/gm)?.length || // TeXLive 2022 and later
output?.stderr?.match(/^Run number \d+ of .*latex/gm)?.length || // TeXLive 2021 and earlier
0
const failed = output?.stdout?.match(/^Latexmk: Errors/m) != null ? 1 : 0
// counters from latexmk output
stats['latexmk-errors'] = failed