public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: end tests quickly if required packages are not installed
@ 2026-09-11 13:19 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 6cde87c598c1ecee24d9654df2460c20d5290923
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2022-04-21T09:52:36+02:00
            Stats  : +18/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/6cde87c598c1ecee24d9654df2460c20d5290923?branch=pr775-checkpolicy-revdeps

            Log:
            end tests quickly if required packages are not installed

If required packages are not installed at the beginning of the
automated test, it makes no sense to run the test, because it would
fail anyway.

---
diff --git a/selinux-policy/bz733494-amanda-and-similar/runtest.sh b/selinux-policy/bz733494-amanda-and-similar/runtest.sh
index 9fd5386..dbb4624 100755
--- a/selinux-policy/bz733494-amanda-and-similar/runtest.sh
+++ b/selinux-policy/bz733494-amanda-and-similar/runtest.sh
@@ -39,6 +39,12 @@ PROCESS_NAME="amandad"
 PROCESS_CONTEXT="amanda_t"
 
 rlJournalStart
+    if ! rpm -q amanda amanda-client amanda-server ; then
+        rlLog "Required packages are not available/installed."
+        rlJournalEnd
+        exit 0
+    fi
+
     rlPhaseStartSetup
         rlRun "rlImport 'selinux-policy/common'"
         rlSESatisfyRequires

diff --git a/selinux-policy/sslh-and-similar/runtest.sh b/selinux-policy/sslh-and-similar/runtest.sh
index e39975e..7979d33 100755
--- a/selinux-policy/sslh-and-similar/runtest.sh
+++ b/selinux-policy/sslh-and-similar/runtest.sh
@@ -40,6 +40,12 @@ PROCESS_NAME="sslh"
 PROCESS_CONTEXT="sslh_t"
 
 rlJournalStart
+    if ! rpm -q ${SERVICE_PACKAGE} ; then
+        rlLog "Required packages are not available/installed."
+        rlJournalEnd
+        exit 0
+    fi
+
     rlPhaseStartSetup
         rlRun "rlImport 'selinux-policy/common'"
         rlSESatisfyRequires

diff --git a/selinux-policy/usbmuxd-and-similar/runtest.sh b/selinux-policy/usbmuxd-and-similar/runtest.sh
index f1d6c77..c3c4c24 100755
--- a/selinux-policy/usbmuxd-and-similar/runtest.sh
+++ b/selinux-policy/usbmuxd-and-similar/runtest.sh
@@ -40,6 +40,12 @@ PROCESS_NAME="usbmuxd"
 PROCESS_CONTEXT="usbmuxd_t"
 
 rlJournalStart
+    if ! rpm -q ${SERVICE_PACKAGE} ; then
+        rlLog "Required packages are not available/installed."
+        rlJournalEnd
+        exit 0
+    fi
+
     rlPhaseStartSetup
         rlRun "rlImport 'selinux-policy/common'"
         rlSESatisfyRequires

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:19 [tests/selinux] pr775-checkpolicy-revdeps: end tests quickly if required packages are not installed Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox