mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-03 05:18:24 +03:00
Terminate individual tests after (10 * $TEST_TIMEOUT_FACTOR) minutes
While using the Automake parallel test harness, if a test hangs for long enough for an external watchdog to kill the entire build process (as happens in Debian sbuild after 150 minutes with no activity on stdout/stderr), the logs will not be shown. If we make an individual test time out sooner, logs are more likely to be shown. We use SIGABRT so that the process(es) under test will dump core, allowing the point at which ostree is blocking to be analyzed. After 1 minute, if any have not died, we kill them again with SIGKILL. To support slow platforms and slow debugging tools, if TEST_TIMEOUT_FACTOR is set, multiply the 10 minute timeout by that. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #607 Approved by: cgwalters
This commit is contained in:
parent
8162463956
commit
c733e21a84
@ -19,7 +19,11 @@ function skip_cleanup() {
|
|||||||
echo "Skipping cleanup of ${tempdir}"
|
echo "Skipping cleanup of ${tempdir}"
|
||||||
}
|
}
|
||||||
cd ${tempdir}
|
cd ${tempdir}
|
||||||
${srcd}/${bn} -k --tap
|
timeout \
|
||||||
|
--kill-after=60 \
|
||||||
|
--signal=ABRT \
|
||||||
|
$(( 600 * ${TEST_TIMEOUT_FACTOR:-1} )) \
|
||||||
|
${srcd}/${bn} -k --tap
|
||||||
rc=$?
|
rc=$?
|
||||||
case "${TEST_SKIP_CLEANUP:-}" in
|
case "${TEST_SKIP_CLEANUP:-}" in
|
||||||
no|"") cleanup ;;
|
no|"") cleanup ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user