mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
test: make sure to reset state before starting integration tests
This commit is contained in:
@@ -1899,6 +1899,9 @@ test_setup() {
|
||||
}
|
||||
|
||||
test_run() {
|
||||
mount_initdir
|
||||
rm -f "$initdir"/{testok,failed,skipped}
|
||||
|
||||
if [ -z "$TEST_NO_QEMU" ]; then
|
||||
if run_qemu "$1"; then
|
||||
check_result_qemu || return 1
|
||||
|
||||
@@ -3,5 +3,6 @@ Description=TEST-01-BASIC
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=sh -e -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; systemctl daemon-reload ; echo OK >/testok'
|
||||
Type=oneshot
|
||||
|
||||
@@ -3,5 +3,6 @@ Description=TEST-02-CRYPTSETUP
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=sh -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; echo OK > /testok'
|
||||
Type=oneshot
|
||||
|
||||
@@ -3,5 +3,6 @@ Description=TEST-03-JOBS
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-04-JOURNAL
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-05-RLIMITS
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -5,5 +5,6 @@ Requires=load-systemd-test-module.service
|
||||
After=load-systemd-test-module.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-07-ISSUE-1981
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-08-ISSUE-2730
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=sh -x -c 'mount -o remount,rw /dev/sda1 && echo OK >/testok; systemctl poweroff'
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Description=TEST-09-ISSUE-2691
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=sh -c '>/testok'
|
||||
ExecStop=sh -c 'kill -SEGV $$$$'
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-10-ISSUE-2467
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
Type=oneshot
|
||||
ExecStart=sh -e -x -c 'rm -f /tmp/nonexistent; systemctl start test10.socket; printf x >test.file; socat -t20 OPEN:test.file UNIX-CONNECT:/run/test.ctl; >/testok'
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-11-ISSUE-3166
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -3,5 +3,6 @@ Description=TEST-12-ISSUE-3171
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-13-NSPAWN-SMOKE
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Description=TEST-14-MACHINE-ID
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
ExecStart=/bin/sh -e -x -c 'systemctl --state=failed --no-legend --no-pager >/failed ; echo OK >/testok'
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-15-DROPIN
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -12,6 +12,7 @@ Wants=fail-runtime.service
|
||||
StopWhenUnneeded=yes
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
Type=simple
|
||||
TimeoutStartSec=infinity
|
||||
ExecStartPre=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-17-UDEV-WANTS
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-18-FAILUREACTION
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
Description=TEST-19-DELEGATE
|
||||
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user