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

index e196003e808b67a0db533c87d8dc169875c72bab..a5a2eb3d2929cfcf6e743c97f6b8e5ef696967dc 100755 (executable)
@@ -15,20 +15,7 @@ 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
     )
 }
 
-do_test "$@"
+do_test "$@" 17
diff --git a/test/units/testsuite-17.service b/test/units/testsuite-17.service
new file mode 100644 (file)
index 0000000..2002543
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=TEST-17-UDEV-WANTS
+
+[Service]
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot
similarity index 99%
rename from test/TEST-17-UDEV-WANTS/testsuite.sh
rename to test/units/testsuite-17.sh
index 989c190ce348a3deb2f2f110ed5e5d83288279e3..7f8740ba3506390a769064677c5fd0c4623a6f24 100755 (executable)
@@ -69,6 +69,6 @@ while : ; do
     sleep .5
 done
 
-echo OK > /testok
+echo OK >/testok
 
 exit 0