mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
test: merge TEST-27-STDOUTFILE into TEST-23-UNIT-FILE
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../TEST-01-BASIC/Makefile
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
set -e
|
||||
|
||||
TEST_DESCRIPTION="test StandardOutput=file:"
|
||||
|
||||
# shellcheck source=test/test-functions
|
||||
. "${TEST_BASE_DIR:?}/test-functions"
|
||||
|
||||
do_test "$@"
|
||||
@@ -3,9 +3,11 @@
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
# Test StandardOutput=file:
|
||||
|
||||
systemd-analyze log-level debug
|
||||
|
||||
systemd-run --wait --unit=test27-one \
|
||||
systemd-run --wait --unit=testsuite-23-standard-output-one \
|
||||
-p StandardOutput=file:/tmp/stdout \
|
||||
-p StandardError=file:/tmp/stderr \
|
||||
-p Type=exec \
|
||||
@@ -17,7 +19,7 @@ cmp /tmp/stderr <<EOF
|
||||
y
|
||||
EOF
|
||||
|
||||
systemd-run --wait --unit=test27-two \
|
||||
systemd-run --wait --unit=testsuite-23-standard-output-two \
|
||||
-p StandardOutput=file:/tmp/stdout \
|
||||
-p StandardError=file:/tmp/stderr \
|
||||
-p Type=exec \
|
||||
@@ -29,7 +31,7 @@ cmp /tmp/stderr <<EOF
|
||||
a
|
||||
EOF
|
||||
|
||||
systemd-run --wait --unit=test27-three \
|
||||
systemd-run --wait --unit=testsuite-23-standard-output-three \
|
||||
-p StandardOutput=append:/tmp/stdout \
|
||||
-p StandardError=append:/tmp/stderr \
|
||||
-p Type=exec \
|
||||
@@ -43,7 +45,7 @@ a
|
||||
c
|
||||
EOF
|
||||
|
||||
systemd-run --wait --unit=test27-four \
|
||||
systemd-run --wait --unit=testsuite-23-standard-output-four \
|
||||
-p StandardOutput=truncate:/tmp/stdout \
|
||||
-p StandardError=truncate:/tmp/stderr \
|
||||
-p Type=exec \
|
||||
@@ -56,7 +58,3 @@ b
|
||||
EOF
|
||||
|
||||
systemd-analyze log-level info
|
||||
|
||||
echo OK >/testok
|
||||
|
||||
exit 0
|
||||
@@ -1,8 +0,0 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
[Unit]
|
||||
Description=TEST-27-STDOUTFILE
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
Reference in New Issue
Block a user