]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: move TEST-25-IMPORT setup to static files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Dec 2019 08:10:28 +0000 (09:10 +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-25-IMPORT/test.sh
test/test-functions
test/units/testsuite-25.service [new file with mode: 0644]
test/units/testsuite-25.sh [moved from test/TEST-25-IMPORT/testsuite.sh with 100% similarity]

index 14265cdfc5d246766895873891d8f867ae6c40ca..977f984bd31b84f585fd57f5230ef5c482ceb458 100755 (executable)
@@ -12,22 +12,9 @@ test_setup() {
         eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
 
         setup_basic_environment
-        dracut_install dd gunzip mv tar diff
-
-        # setup the testsuite service
-        cat >$initdir/etc/systemd/system/testsuite.service <<EOF
-[Unit]
-Description=Testsuite service
-
-[Service]
-ExecStart=/testsuite.sh
-Type=oneshot
-EOF
-        cp testsuite.sh $initdir/
-
-        setup_testsuite
+        mask_supporting_services
     )
     setup_nspawn_root
 }
 
-do_test "$@"
+do_test "$@" 25
index 70e3e75be3d1222898406539b8b2c279f3207d8d..dfc2573bdc400e1b964042f8350adb9af1f69705 100644 (file)
@@ -92,6 +92,7 @@ BASICTOOLS=(
     sulogin
     sysctl
     tail
+    tar
     tee
     test
     touch
diff --git a/test/units/testsuite-25.service b/test/units/testsuite-25.service
new file mode 100644 (file)
index 0000000..39b4391
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=TEST-25-IMPORT
+
+[Service]
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot