1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

test: do not lose logs of late failures in TEST-02-UNITTESTS

Due to set -e, if the wait() fails (eg: because of an assert in the
waited task), report_result() never runs and logs are lost
This commit is contained in:
Luca Boccassi 2021-06-21 12:34:07 +01:00
parent 35cde9e935
commit 7d3f9bf493

View File

@ -78,10 +78,12 @@ done
# Wait for remaining running tasks
for key in "${!running[@]}"; do
wait ${running[$key]}
ec=$?
wait ${running[$key]} && ec=0 || ec=$?
report_result "$key" $ec
unset running["$key"]
done
# Test logs are sometimes lost, as the system shuts down immediately after
journalctl --sync
exit 0