diff options
author | Jakub Ružička <jakub.ruzicka@nic.cz> | 2024-09-23 16:59:52 +0200 |
---|---|---|
committer | Aleš Mrázek <ales.mrazek@nic.cz> | 2024-09-30 11:16:07 +0200 |
commit | 0f85472c52b6972877116d44e5688a4028f9ec55 (patch) | |
tree | b1a86a43d8c007b63b11e5c7c78eff6a2d8ed631 /tests | |
parent | distro/pkg: update packaging for single python module (diff) | |
download | knot-resolver-0f85472c52b6972877116d44e5688a4028f9ec55.tar.xz knot-resolver-0f85472c52b6972877116d44e5688a4028f9ec55.zip |
tests/packaging: skip systemd tests without systemd
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/packaging/systemd_service.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/packaging/systemd_service.sh b/tests/packaging/systemd_service.sh index 9dec16ab..a4425385 100755 --- a/tests/packaging/systemd_service.sh +++ b/tests/packaging/systemd_service.sh @@ -9,6 +9,14 @@ if test "$(id -u)" -ne 0; then exit 1 fi +# SKIP test when systemd isn't PID 1 +if [[ -d /run/systemd/system ]] ; then + echo "systemd detected -> RUN systemd tests" +else + echo "systemd not detected -> SKIP systemd tests" + exit 77 +fi + # We will be starting a systemd service, but another tests might do the same # so this makes sure there is nothing left after we exit trap "systemctl stop knot-resolver.service" EXIT |