mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
TEST-02-UNITTESTS: Fix exit code checks
This commit is contained in:
parent
412e2a6487
commit
8acb02f395
@ -60,15 +60,7 @@ run_test() {
|
||||
exec {LOCK_FD}> /lock
|
||||
flock --exclusive ${LOCK_FD}
|
||||
|
||||
if [[ $ret -ne 0 && $ret != 77 && $ret != 127 ]]; then
|
||||
echo "$name failed with $ret"
|
||||
echo "$name" >>/failed-tests
|
||||
{
|
||||
echo "--- $name begin ---"
|
||||
journalctl --unit="$name" --no-hostname -o short-monotonic
|
||||
echo "--- $name end ---"
|
||||
} >>/failed
|
||||
elif [[ $ret == 77 || $ret == 127 ]]; then
|
||||
if [[ $ret -eq 77 ]] || [[ $ret -eq 127 ]]; then
|
||||
echo "$name skipped"
|
||||
echo "$name" >>/skipped-tests
|
||||
{
|
||||
@ -76,6 +68,14 @@ run_test() {
|
||||
journalctl --unit="$name" --no-hostname -o short-monotonic
|
||||
echo "--- $name end ---"
|
||||
} >>/skipped
|
||||
elif [[ $ret -ne 0 ]]; then
|
||||
echo "$name failed with $ret"
|
||||
echo "$name" >>/failed-tests
|
||||
{
|
||||
echo "--- $name begin ---"
|
||||
journalctl --unit="$name" --no-hostname -o short-monotonic
|
||||
echo "--- $name end ---"
|
||||
} >>/failed
|
||||
else
|
||||
echo "$name OK"
|
||||
echo "$name" >>/testok
|
||||
|
Loading…
x
Reference in New Issue
Block a user