From: Ben Crocker bcrocker@redhat.com
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 bcrocker@redhat.com --- 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 ] }