diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-04-21 13:18:36 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-22 08:57:38 +0200 |
commit | 80b44b38b585756960f99552e6cfe394a6cff521 (patch) | |
tree | 41a71dde0cefbf016408801030f5777e4859647d /test | |
parent | f6f4f5fe5395a57f10dd446c7266c53f0673eaac (diff) | |
download | systemd-80b44b38b585756960f99552e6cfe394a6cff521.tar.gz |
test: correctly clean up test artifacts
Remove the artifact files indicating test result (testok, failed, and
skipped) just before running the test so we always get the latest and
most relevant result instead of incorrectly consuming previous results.
Discovered in https://github.com/systemd/systemd/pull/15378#issuecomment-616801873
Diffstat (limited to 'test')
-rw-r--r-- | test/test-functions | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/test-functions b/test/test-functions index d468efb0b7..8389623c20 100644 --- a/test/test-functions +++ b/test/test-functions @@ -234,6 +234,7 @@ run_qemu() { CONSOLE=ttyS0 + rm -f "$initdir"/{testok,failed,skipped} # make sure the initdir is not mounted to avoid concurrent access cleanup_initdir umount_loopback @@ -362,6 +363,7 @@ $QEMU_OPTIONS \ # success), or 1 if nspawn is not available. run_nspawn() { [[ -d /run/systemd/system ]] || return 1 + rm -f "$initdir"/{testok,failed,skipped} local _nspawn_cmd=( --register=no @@ -2014,7 +2016,6 @@ test_setup() { test_run() { mount_initdir - rm -f "$initdir"/{testok,failed,skipped} if [ -z "$TEST_NO_QEMU" ]; then if run_qemu "$1"; then |