]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: move TEST-03-JOBS setup to static files
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 Dec 2019 18:09:32 +0000 (19:09 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 28 Mar 2020 10:46:47 +0000 (11:46 +0100)
test/TEST-03-JOBS/test.sh
test/units/testsuite-03.service [new file with mode: 0644]
test/units/testsuite-03.sh [moved from test/TEST-03-JOBS/test-jobs.sh with 100% similarity]

index 5299464b81d46805cde46ef0dd1b5a99f4cbc34f..8b12e5ba9ddf5a66545201bd8121b72151d04ad8 100755 (executable)
@@ -15,26 +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
-After=multi-user.target
-
-[Service]
-ExecStart=/test-jobs.sh
-Type=oneshot
-EOF
-
-        # copy the units used by this test
-        cp $TEST_BASE_DIR/{hello.service,sleep.service,hello-after-sleep.target,unstoppable.service} \
-            $initdir/etc/systemd/system
-        cp test-jobs.sh $initdir/
-
-        setup_testsuite
     )
     setup_nspawn_root
 }
 
-do_test "$@"
+do_test "$@" 03
diff --git a/test/units/testsuite-03.service b/test/units/testsuite-03.service
new file mode 100644 (file)
index 0000000..f487d41
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=TEST-03-JOBS
+After=multi-user.target
+
+[Service]
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot