summaryrefslogtreecommitdiffstats
path: root/test/TEST-27-STDOUTFILE
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-10 09:19:13 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-28 11:46:47 +0100
commit468874997a274e5ba576f82f6fd201692507525b (patch)
tree5638f06b0c66d71326afc211f674204109686d6c /test/TEST-27-STDOUTFILE
parenttest: move TEST-26-SETENV setup to static files (diff)
downloadsystemd-468874997a274e5ba576f82f6fd201692507525b.tar.xz
systemd-468874997a274e5ba576f82f6fd201692507525b.zip
test: move TEST-27-STDOUTFILE setup to static files
Diffstat (limited to 'test/TEST-27-STDOUTFILE')
-rwxr-xr-xtest/TEST-27-STDOUTFILE/test.sh16
-rwxr-xr-xtest/TEST-27-STDOUTFILE/testsuite.sh50
2 files changed, 1 insertions, 65 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/TEST-27-STDOUTFILE/testsuite.sh b/test/TEST-27-STDOUTFILE/testsuite.sh
deleted file mode 100755
index c522f75dbc..0000000000
--- a/test/TEST-27-STDOUTFILE/testsuite.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env bash
-set -ex
-set -o pipefail
-
-systemd-analyze log-level debug
-systemd-analyze log-target console
-
-systemd-run --wait --unit=one \
- -p StandardOutput=file:/tmp/stdout \
- -p StandardError=file:/tmp/stderr \
- -p Type=exec \
- sh -c 'echo x ; echo y >&2'
-cmp /tmp/stdout <<EOF
-x
-EOF
-cmp /tmp/stderr <<EOF
-y
-EOF
-
-systemd-run --wait --unit=two \
- -p StandardOutput=file:/tmp/stdout \
- -p StandardError=file:/tmp/stderr \
- -p Type=exec \
- sh -c 'echo z ; echo a >&2'
-cmp /tmp/stdout <<EOF
-z
-EOF
-cmp /tmp/stderr <<EOF
-a
-EOF
-
-systemd-run --wait --unit=three \
- -p StandardOutput=append:/tmp/stdout \
- -p StandardError=append:/tmp/stderr \
- -p Type=exec \
- sh -c 'echo b ; echo c >&2'
-cmp /tmp/stdout <<EOF
-z
-b
-EOF
-cmp /tmp/stderr <<EOF
-a
-c
-EOF
-
-systemd-analyze log-level info
-
-echo OK > /testok
-
-exit 0