diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-28 15:54:35 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-29 14:10:50 +0200 |
commit | 1e5a1bbe0208fd6e26bd74377cf7eb488d158045 (patch) | |
tree | 6f6f7dd98a9d1cb0a6897df04bd71561b827ea93 /test/integration-test-wrapper.py | |
parent | mkosi: Disable iscsi service and socket (diff) | |
download | systemd-1e5a1bbe0208fd6e26bd74377cf7eb488d158045.tar.xz systemd-1e5a1bbe0208fd6e26bd74377cf7eb488d158045.zip |
test: Run tests that don't need a vm in systemd-nspawn
If we're not running the test as root, stick to using a virtual
machine, as mkosi can't do rootless nspawn yet.
Diffstat (limited to 'test/integration-test-wrapper.py')
-rwxr-xr-x | test/integration-test-wrapper.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py index c84296d816..5b098a3e01 100755 --- a/test/integration-test-wrapper.py +++ b/test/integration-test-wrapper.py @@ -48,6 +48,7 @@ def main(): parser.add_argument('--storage', required=True) parser.add_argument('--firmware', required=True) parser.add_argument('--slow', action=argparse.BooleanOptionalAction) + parser.add_argument('--vm', action=argparse.BooleanOptionalAction) parser.add_argument('--exit-code', required=True, type=int) parser.add_argument('mkosi_args', nargs="*") args = parser.parse_args() @@ -145,7 +146,7 @@ def main(): ), ]), '--credential', f"journal.storage={'persistent' if sys.stderr.isatty() else args.storage}", - 'qemu', + 'qemu' if args.vm or os.getuid() != 0 else 'boot', ] result = subprocess.run(cmd) |