mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
test: move TEST-27-STDOUTFILE setup to static files
This commit is contained in:
parent
dfa633ca6a
commit
468874997a
@ -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
|
||||
|
6
test/units/testsuite-27.service
Normal file
6
test/units/testsuite-27.service
Normal file
@ -0,0 +1,6 @@
|
||||
[Unit]
|
||||
Description=TEST-27-STDOUTFILE
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
@ -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
|
Loading…
Reference in New Issue
Block a user