1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

test: merge TEST-27-STDOUTFILE into TEST-23-UNIT-FILE

This commit is contained in:
Frantisek Sumsal 2023-05-16 18:42:14 +02:00
parent b4d42a82eb
commit 9245eb3cbd
4 changed files with 6 additions and 27 deletions

View File

@ -1 +0,0 @@
../TEST-01-BASIC/Makefile

View File

@ -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 "$@"

View File

@ -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

View File

@ -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