mirror of
https://github.com/systemd/systemd.git
synced 2025-01-25 10:04:04 +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:
parent
35cde9e935
commit
7d3f9bf493
@ -78,10 +78,12 @@ done
|
|||||||
|
|
||||||
# Wait for remaining running tasks
|
# Wait for remaining running tasks
|
||||||
for key in "${!running[@]}"; do
|
for key in "${!running[@]}"; do
|
||||||
wait ${running[$key]}
|
wait ${running[$key]} && ec=0 || ec=$?
|
||||||
ec=$?
|
|
||||||
report_result "$key" $ec
|
report_result "$key" $ec
|
||||||
unset running["$key"]
|
unset running["$key"]
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Test logs are sometimes lost, as the system shuts down immediately after
|
||||||
|
journalctl --sync
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user