`TEST_SKIP_TESTCASE=testcase`: takes a space separated list of testcases to skip.
+`TEST_JOURNAL_USE_TMP=1`: Write test journal to `/tmp` while the test is in
+progress and only move the journal to its final location in the build directory
+(`$BUILD_DIR/test/journal`) when the test is finished.
+
### SELinux AVCs
To have `TEST-06-SELINUX` check for SELinux denials, write the following to
import os
import re
import shlex
+import shutil
import subprocess
import sys
import tempfile
"""
)
- journal_file = (args.meson_build_dir / (f'test/journal/{name}.journal')).absolute()
+ if os.getenv('TEST_JOURNAL_USE_TMP', '0') == '1':
+ journal_file = Path(f'/tmp/systemd-integration-tests/journal/{name.journal}')
+ else:
+ journal_file = (args.meson_build_dir / f'test/journal/{name}.journal').absolute()
+
journal_file.unlink(missing_ok=True)
if not sys.stderr.isatty():
):
journal_file.unlink(missing_ok=True)
+ if 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)
+
if shell or (result.returncode in (args.exit_code, 77) and not coredumps and not sanitizer):
exit(0 if shell or result.returncode == args.exit_code else 77)