[OS-BUILD PATCHv5 15/26] [redhat] self-test/1001-rpmlint.bats: check for rpmlint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Crocker <bcrocker@xxxxxxxxxx>

Check whether the rpmlint package is installed; if it is not
installed, skip the test and print a message.

Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx>
---
 redhat/self-test/1001-rpmlint.bats | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/redhat/self-test/1001-rpmlint.bats b/redhat/self-test/1001-rpmlint.bats
index bd0d8d1bcc24..15d9bb1e27db 100644
--- a/redhat/self-test/1001-rpmlint.bats
+++ b/redhat/self-test/1001-rpmlint.bats
@@ -5,7 +5,11 @@
 }
 
 @test "rpmlint" {
-      srpm=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm")
-      run rpmlint $srpm
-      [ "$status" = 0 ]
+    if ! dnf list installed rpmlint >& /dev/null
+    then
+        skip "The rpmlint package is not installed"
+    fi
+    srpm=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm")
+    run rpmlint $srpm
+    [ "$status" = 0 ]
 }
-- 
GitLab
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux