opensc/tests/test-pkcs11-tool-test.sh
Jakub Jelen 8c99e5076a tests: Verify the pkcs11-tool --test works
Note, that it does not work now until #1600 will get resolved. Then,
move the test to TESTS in the Makefile.am
2019-04-08 11:15:19 +02:00

26 lines
692 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"
echo "======================================================="
$PKCS11_TOOL --test -p $PIN --module $P11LIB
assert $? "Failed running tests"
echo "======================================================="
echo "Cleanup"
echo "======================================================="
card_cleanup
exit $ERRORS