mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
test: do not remove state directory on failure
The test log is in the state directory, and we want to keep it around
when a test fails.
Follow-up for: 256a835f1c
This commit is contained in:
committed by
Yu Watanabe
parent
8d9c779cc8
commit
49e8342965
@@ -3040,7 +3040,6 @@ _test_cleanup() {
|
||||
fi
|
||||
[[ -n "$TESTDIR" ]] && rm -vfr "$TESTDIR"
|
||||
[[ -n "$STATEFILE" ]] && rm -vf "$STATEFILE"
|
||||
[[ -n "$STATEDIR" ]] && rm -vfr "$STATEDIR"
|
||||
) || :
|
||||
}
|
||||
|
||||
@@ -3255,7 +3254,8 @@ do_test() {
|
||||
fi
|
||||
test_cleanup
|
||||
if [ $ret -eq 0 ]; then
|
||||
rm "$TESTLOG"
|
||||
# $TESTLOG is in $STATEDIR, so clean it up only on success
|
||||
[[ -n "$STATEDIR" ]] && rm -vfr "$STATEDIR"
|
||||
echo "[OK]"
|
||||
else
|
||||
echo "[FAILED]"
|
||||
|
||||
Reference in New Issue
Block a user