opensc/tests/test-pkcs11-tool-test-threads.sh
Doug Engert b5ddaf6e02 Add tests of pkcs11-tool --test-threads
These should run when a PR is submitted.

 Changes to be committed:
	modified:   tests/Makefile.am
	new file:   tests/test-pkcs11-tool-test-threads.sh
2021-01-26 12:50:39 +01:00

34 lines
951 B
Bash
Executable File

#!/bin/bash
source common.sh
echo "======================================================="
echo "Setup SoftHSM"
echo "======================================================="
if [[ ! -f $P11LIB ]]; then
echo "WARNINIG: The SoftHSM is not installed. Can not run this test"
exit 77;
fi
card_setup
echo "======================================================="
echo "Test pkcs11 threads OSILGISLT0 "
echo "======================================================="
$PKCS11_TOOL --test-threads IN -L
assert $? "Failed running tests"
echo "======================================================="
echo "Test pkcs11 threads OSILGISLT0 "
echo "======================================================="
$PKCS11_TOOL --test-threads OSILGISLT0 -L
assert $? "Failed running tests"
echo "======================================================="
echo "Cleanup"
echo "======================================================="
card_cleanup
exit $ERRORS