From: Ben Crocker <[email protected]> Check via 'test -x' whether the rpmlint package is installed; if it is not installed, skip the test and print a message.
Signed-off-by: Ben Crocker <[email protected]> --- 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..093041d8cbfa 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 ! test -x /usr/bin/rpmlint + 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 -- [email protected] To unsubscribe send an email to [email protected] 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/[email protected]
