]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: move TEST-26-SETENV setup to static files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Dec 2019 08:13:20 +0000 (09:13 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Mar 2020 10:46:47 +0000 (11:46 +0100)
Also run mask_supporting_services() here.

test/TEST-26-SETENV/test.sh
test/units/testsuite-26.service [new file with mode: 0644]
test/units/testsuite-26.sh [moved from test/TEST-26-SETENV/testsuite.sh with 100% similarity]

index ee0f562277b05c2a12cf9121fa6aae7f09b623b4..7b71fcda3afc140e67f891c569c9e8a2a2d33357 100755 (executable)
@@ -12,21 +12,9 @@ test_setup() {
         eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
 
         setup_basic_environment
-
-        # setup the testsuite service
-        cat >$initdir/etc/systemd/system/testsuite.service <<EOF
-[Unit]
-Description=Testsuite service
-
-[Service]
-ExecStart=/bin/bash -x /testsuite.sh
-Type=oneshot
-EOF
-        cp testsuite.sh $initdir/
-
-        setup_testsuite
+        mask_supporting_services
     )
     setup_nspawn_root
 }
 
-do_test "$@"
+do_test "$@" 26
diff --git a/test/units/testsuite-26.service b/test/units/testsuite-26.service
new file mode 100644 (file)
index 0000000..ac1b2fa
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=TEST-26-SETENV
+
+[Service]
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot