diff --git a/Sanity/testsuite/main.fmf b/Sanity/testsuite/main.fmf index 37563bb..c306132 100644 --- a/Sanity/testsuite/main.fmf +++ b/Sanity/testsuite/main.fmf @@ -9,6 +9,7 @@ framework: beakerlib require: - url: https://src.fedoraproject.org/tests/opencryptoki.git name: /Library/token-manipulation +- library(nvr/nvr) recommend: - opencryptoki - gcc diff --git a/Sanity/testsuite/runtest.sh b/Sanity/testsuite/runtest.sh index 8dcd34d..0d54a15 100755 --- a/Sanity/testsuite/runtest.sh +++ b/Sanity/testsuite/runtest.sh @@ -60,6 +60,7 @@ function get_test_id() { rlJournalStart rlPhaseStartSetup rlRun "rlImport opencryptoki/token-manipulation" || rlDie "Could not import opencryptoki/token-manipulation library" + rlRun "rlImport nvr/nvr" || rlDie "cannot import distribution/nvr library" export PKCS11_USER_PIN=$pkcsUSER_PIN export PKCS11_SO_PIN=$pkcsSO_PIN rlAssertRpm $PACKAGE @@ -138,6 +139,17 @@ rlJournalStart ID=`get_test_id` rlRun "./fork -slot $SLOT &> $TmpDir/testlog.$ID" [ $? -gt 0 ] && echo -e "Test log:\n" && cat $TmpDir/testlog.$ID # print log in case of error + rlAssertGrep 'Errors=0' $TmpDir/testlog.$ID + rlAssertGrep 'Failed=0' $TmpDir/testlog.$ID + + # events - added in 3.16.0-3.el9 + if nvrTestPackage opencryptoki '>=' 3.16.0; then + ID=`get_test_id` + rlRun "./events -slot $SLOT &> $TmpDir/testlog.$ID" + [ $? -gt 0 ] && echo -e "Test log:\n" && cat $TmpDir/testlog.$ID # print log in case of error + rlAssertGrep 'Errors=0' $TmpDir/testlog.$ID + rlAssertGrep 'Failed=0' $TmpDir/testlog.$ID + fi popd else