From: Frantisek Sumsal Date: Tue, 24 Oct 2023 10:35:03 +0000 (+0200) Subject: test: introduce $TEST_SKIP_SHUTDOWN X-Git-Tag: v255-rc1~153^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ab2f737cdd43a97a829abbd4788a72e2665422c;p=thirdparty%2Fsystemd.git test: introduce $TEST_SKIP_SHUTDOWN To get rid of some boilerplate. --- diff --git a/test/TEST-69-SHUTDOWN/test.sh b/test/TEST-69-SHUTDOWN/test.sh index c7f78fe3c9b..c813b5534fb 100755 --- a/test/TEST-69-SHUTDOWN/test.sh +++ b/test/TEST-69-SHUTDOWN/test.sh @@ -4,7 +4,9 @@ set -e TEST_DESCRIPTION="shutdown testing" IMAGE_NAME="shutdown" -TEST_NO_QEMU=1 +TEST_NO_QEMU=yes +# Prevent shutdown in test suite, the expect script does that manually. +TEST_SKIP_SHUTDOWN=yes # shellcheck source=test/test-functions . "${TEST_BASE_DIR:?}/test-functions" @@ -23,13 +25,7 @@ EOF test_append_files() { local workspace="${1:?}" - # prevent shutdown in test suite, the expect script does that manually. - mkdir -p "${workspace:?}/etc/systemd/system/end.service.d" - cat >"$workspace/etc/systemd/system/end.service.d/99-override.conf" <>"$workspace/root/.bashrc" echo 'startup_message off' >"$workspace/etc/screenrc" diff --git a/test/TEST-82-SOFTREBOOT/test.sh b/test/TEST-82-SOFTREBOOT/test.sh index 101b2508426..04941491856 100755 --- a/test/TEST-82-SOFTREBOOT/test.sh +++ b/test/TEST-82-SOFTREBOOT/test.sh @@ -5,19 +5,10 @@ set -e TEST_DESCRIPTION="Test Soft-Rebooting" # We temporarily remount rootfs read-only, so ignore any missing coverage IGNORE_MISSING_COVERAGE=yes +# Prevent shutdown in test suite, the expect script does that manually. +TEST_SKIP_SHUTDOWN=yes # shellcheck source=test/test-functions . "$TEST_BASE_DIR/test-functions" -test_append_files() { - local workspace="${1:?}" - # prevent shutdown in test suite, the expect script does that manually. - mkdir -p "${workspace:?}/etc/systemd/system/end.service.d" - cat >"$workspace/etc/systemd/system/end.service.d/99-override.conf" <