diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-12-10 09:19:13 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-28 11:46:47 +0100 |
commit | 468874997a274e5ba576f82f6fd201692507525b (patch) | |
tree | 5638f06b0c66d71326afc211f674204109686d6c /test | |
parent | test: move TEST-26-SETENV setup to static files (diff) | |
download | systemd-468874997a274e5ba576f82f6fd201692507525b.tar.xz systemd-468874997a274e5ba576f82f6fd201692507525b.zip |
test: move TEST-27-STDOUTFILE setup to static files
Diffstat (limited to 'test')
-rwxr-xr-x | test/TEST-27-STDOUTFILE/test.sh | 16 | ||||
-rw-r--r-- | test/units/testsuite-27.service | 6 | ||||
-rwxr-xr-x | test/units/testsuite-27.sh (renamed from test/TEST-27-STDOUTFILE/testsuite.sh) | 8 |
3 files changed, 11 insertions, 19 deletions
diff --git a/test/TEST-27-STDOUTFILE/test.sh b/test/TEST-27-STDOUTFILE/test.sh index 66c98e5675..80c4b0920c 100755 --- a/test/TEST-27-STDOUTFILE/test.sh +++ b/test/TEST-27-STDOUTFILE/test.sh @@ -13,22 +13,8 @@ test_setup() { setup_basic_environment mask_supporting_services - inst_binary cmp - - # 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 ) setup_nspawn_root } -do_test "$@" +do_test "$@" 27 diff --git a/test/units/testsuite-27.service b/test/units/testsuite-27.service new file mode 100644 index 0000000000..a1e8851088 --- /dev/null +++ b/test/units/testsuite-27.service @@ -0,0 +1,6 @@ +[Unit] +Description=TEST-27-STDOUTFILE + +[Service] +ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh +Type=oneshot diff --git a/test/TEST-27-STDOUTFILE/testsuite.sh b/test/units/testsuite-27.sh index c522f75dbc..9d92e6e574 100755 --- a/test/TEST-27-STDOUTFILE/testsuite.sh +++ b/test/units/testsuite-27.sh @@ -5,7 +5,7 @@ set -o pipefail systemd-analyze log-level debug systemd-analyze log-target console -systemd-run --wait --unit=one \ +systemd-run --wait --unit=test27-one \ -p StandardOutput=file:/tmp/stdout \ -p StandardError=file:/tmp/stderr \ -p Type=exec \ @@ -17,7 +17,7 @@ cmp /tmp/stderr <<EOF y EOF -systemd-run --wait --unit=two \ +systemd-run --wait --unit=test27-two \ -p StandardOutput=file:/tmp/stdout \ -p StandardError=file:/tmp/stderr \ -p Type=exec \ @@ -29,7 +29,7 @@ cmp /tmp/stderr <<EOF a EOF -systemd-run --wait --unit=three \ +systemd-run --wait --unit=test27-three \ -p StandardOutput=append:/tmp/stdout \ -p StandardError=append:/tmp/stderr \ -p Type=exec \ @@ -45,6 +45,6 @@ EOF systemd-analyze log-level info -echo OK > /testok +echo OK >/testok exit 0 |