From 2222dadabbbd03be9b4b917583fd51b34857f40c Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 30 Jan 2026 13:00:19 +0100 Subject: [PATCH 1/2] ci: [refactor] Allow overwriting check option in run helper Also, use str(e) consistently in all run helpers. This refactor does not change any behavior. This can be reviewed by checking that all instances are exactly identical code now: $ git grep --function-context 'def run(cmd' --- .github/ci-test-each-commit-exec.py | 5 +++-- ci/test/02_run_container.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/ci-test-each-commit-exec.py b/.github/ci-test-each-commit-exec.py index b81241bc20a..c8ec16ef854 100755 --- a/.github/ci-test-each-commit-exec.py +++ b/.github/ci-test-each-commit-exec.py @@ -10,10 +10,11 @@ import shlex def run(cmd, **kwargs): print("+ " + shlex.join(cmd), flush=True) + kwargs.setdefault("check", True) try: - return subprocess.run(cmd, check=True, **kwargs) + return subprocess.run(cmd, **kwargs) except Exception as e: - sys.exit(e) + sys.exit(str(e)) def main(): diff --git a/ci/test/02_run_container.py b/ci/test/02_run_container.py index 921c5d14705..dce3730a65a 100755 --- a/ci/test/02_run_container.py +++ b/ci/test/02_run_container.py @@ -17,7 +17,7 @@ def run(cmd, **kwargs): try: return subprocess.run(cmd, **kwargs) except Exception as e: - sys.exit(e) + sys.exit(str(e)) def main(): From bbbb78a4f28fd2378342398ccae60995ae0e08d2 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 30 Jan 2026 13:10:42 +0100 Subject: [PATCH 2/2] ci: Print verbose build error message in test-each-commit --- .github/ci-test-each-commit-exec.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/ci-test-each-commit-exec.py b/.github/ci-test-each-commit-exec.py index c8ec16ef854..fcd3bbdb546 100755 --- a/.github/ci-test-each-commit-exec.py +++ b/.github/ci-test-each-commit-exec.py @@ -43,7 +43,11 @@ def main(): # Tolerate unused member functions in intermediate commits in a pull request "-DCMAKE_CXX_FLAGS=-Wno-error=unused-member-function", ]) - run(["cmake", "--build", build_dir, "-j", str(num_procs)]) + + if run(["cmake", "--build", build_dir, "-j", str(num_procs)], check=False).returncode != 0: + print("Build failure. Verbose build follows.") + run(["cmake", "--build", build_dir, "-j1", "--verbose"]) + run([ "ctest", "--output-on-failure",