From: Ben Crocker <bcrocker@xxxxxxxxxx> Like the 1001-rpmlint.bats test, this test ⢠tests for exactly one SRPM ⢠runs rpminspect (instead of rpmlint) on that SRPM, after checking for the presence of the /usr/bin/rpminspect. Checks for existence of /usr/bin/rpminspect via test -x Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx> --- redhat/self-test/1003-rpminspect.bats | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 redhat/self-test/1003-rpminspect.bats diff --git a/redhat/self-test/1003-rpminspect.bats b/redhat/self-test/1003-rpminspect.bats new file mode 100644 index 000000000000..58ec8f9665cd --- /dev/null +++ b/redhat/self-test/1003-rpminspect.bats @@ -0,0 +1,15 @@ +#!/usr/bin/env bats +@test "Exactly one SRPM exists" { + result=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm" | wc -l) + [ "$result" = 1 ] +} + +@test "rpminspect" { + if ! test -x /usr/bin/rpminspect + then + skip "The rpminspect package is not installed" + fi + srpm=$(find "$BATS_TEST_DIRNAME"/.. -name "*.rpm") + run rpminspect $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