]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: move TEST-37-RUNTIMEDIRECTORYPRESERVE setup to static files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Dec 2019 08:58:50 +0000 (09:58 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Mar 2020 10:46:48 +0000 (11:46 +0100)
test/TEST-37-RUNTIMEDIRECTORYPRESERVE/test.sh
test/units/testsuite-37.service [new file with mode: 0644]
test/units/testsuite-37.sh [moved from test/TEST-37-RUNTIMEDIRECTORYPRESERVE/testsuite.sh with 100% similarity]

index 2c5ad430b5e8f6da67358b5703b2119b96010bae..44f77bc6a0fd80248207124f214fcc3a58ac00d7 100755 (executable)
@@ -15,21 +15,8 @@ test_setup() {
 
         setup_basic_environment
         mask_supporting_services
-
-        # 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
-    ) || return 1
+    )
     setup_nspawn_root
 }
 
-do_test "$@"
+do_test "$@" 37
diff --git a/test/units/testsuite-37.service b/test/units/testsuite-37.service
new file mode 100644 (file)
index 0000000..68c8059
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=TEST-37-RUNTIMEDIRECTORYPRESERVE
+
+[Service]
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot