diff --git a/Sanity/testsuite/runtest.sh b/Sanity/testsuite/runtest.sh index e78a0fa..6f815fd 100755 --- a/Sanity/testsuite/runtest.sh +++ b/Sanity/testsuite/runtest.sh @@ -39,7 +39,7 @@ PACKAGE="opencryptoki" LOGDIR=`mktemp -d` - +[ -z "$SLOT" ] && SLOT=sw function reset_tokens() { rlLogInfo "Reseting tokens..." @@ -84,7 +84,7 @@ rlJournalStart pkcsconf -t # allow to pass SLOT number as a parameter # or take the first available slot (Token) - [ -z "$SLOT" ] && SLOT=`pkcsconf -t | sed -n 's/^Token #\([0-9]\).*/\1/gp' | head -n 1` + SLOT=$( pkcsGetTokenSlot $SLOT ) rlLogInfo "Token under a test" pkcsconf -t -c $SLOT