]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Only move journal file if we didn't just unlink it
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 14 Jan 2025 08:52:40 +0000 (09:52 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 15 Jan 2025 09:56:07 +0000 (09:56 +0000)
(cherry picked from commit 1d77ac19cfa1c9b194d7e9805430ab6fd38ba97e)

test/integration-test-wrapper.py

index 5321faef5781870ee101eb176d2cec0e5aae7bf4..a7bf5ea6060d4b78f3049b60662ae46dc14cd6a7 100755 (executable)
@@ -556,8 +556,7 @@ def main() -> None:
         and not sanitizer
     ):
         journal_file.unlink(missing_ok=True)
-
-    if os.getenv('TEST_JOURNAL_USE_TMP', '0') == '1':
+    elif os.getenv('TEST_JOURNAL_USE_TMP', '0') == '1':
         dst = args.meson_build_dir / f'test/journal/{name}.journal'
         dst.parent.mkdir(parents=True, exist_ok=True)
         shutil.move(journal_file, dst)