Skip to content

Commit e737526

Browse files
authored
Merge pull request #797 from fdesbiens/fix/ctest-timeout-headroom
Gave the per-test ctest timeout headroom over the slowest test
2 parents 6697298 + 902fb73 commit e737526

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)