Skip to content

Commit 902fb73

Browse files
committed
Gave the per-test ctest timeout headroom over the slowest test
The ceiling was 1000 seconds and GUIX's guix_bidi_text_draw_32bpp needs most of it. Measured across six passing runs in October 2026 it took between 831 and 957 seconds, and it timed out four times in the same period. Nothing about the test changed between the passes and the timeouts; runner load decided it, because the suite builds and tests five configurations at once. Each timeout also costs twice the ceiling, since until-pass:2 runs a failing test again, and the failures were indistinguishable from a real hang in the logs. Raised the default to 1500 and made it overridable through CTEST_TIMEOUT, matching how CTEST_PARALLEL_LEVEL and CTEST_REPEAT_FAIL are already handled. A per-test TIMEOUT property on the one slow test was considered and rejected because the ceiling is shared by every suite this script serves and the next slow test should not need a second fix. bash -n parses. The default and the override both resolve as intended. A test that times out twice now occupies 50 minutes of the 60 minute job timeout, so a genuine hang still fails the test rather than the step. This repository's own suites call the template by relative path and so ran the new ceiling: tx, smp, riscv and freertos all green. Components referencing the template at @master keep the old ceiling until this reaches master. Assisted-by: Claude Code (Opus 5) <noreply@anthropic.com>
1 parent 93387b0 commit 902fb73

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎scripts/cmake_bootstrap.sh‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,18 @@ function test() {
8989
else
9090
repeat_fail=${CTEST_REPEAT_FAIL}
9191
fi
92+
# The per-test ceiling. It has to clear the slowest test in any suite this
93+
# script serves by enough that runner load cannot push a passing test over
94+
# it, and still leave a timing-out test inside the 60 minute job timeout
95+
# after until-pass has run it twice. GUIX's guix_bidi_text_draw_32bpp is the
96+
# slowest known: measured between 831 and 957 seconds across six passing
97+
# runs in October 2026, against a ceiling that was then 1000.
98+
if [ -z "${CTEST_TIMEOUT}" ];
99+
then
100+
ctest_timeout=1500
101+
else
102+
ctest_timeout=${CTEST_TIMEOUT}
103+
fi
92104
# ctest's status is captured rather than allowed to abort the function, and
93105
# returned at the end. set -e would otherwise stop here on the first failing
94106
# test, and every configuration after it would go untested -- and, before
@@ -100,7 +112,7 @@ function test() {
100112
# itself now happens in collect_all_coverage, after every configuration has
101113
# been tested, and it does not stop at the first failure either.
102114
local status=0
103-
ctest $parallel --timeout 1000 -O $1.txt -T test --no-compress-output --test-output-size-passed 4194304 --test-output-size-failed 4194304 --output-on-failure --repeat until-pass:${repeat_fail} --output-junit $1.xml || status=$?
115+
ctest $parallel --timeout ${ctest_timeout} -O $1.txt -T test --no-compress-output --test-output-size-passed 4194304 --test-output-size-failed 4194304 --output-on-failure --repeat until-pass:${repeat_fail} --output-junit $1.xml || status=$?
104116
popd
105117
# Tolerated because this is a summary for humans, and a ctest that died early
106118
# enough to leave no matching line must not be what stops the coverage below.

0 commit comments

Comments
 (0)