[pkg-opensc-commit] [libp11] 01/67: Fixed testing on Mac

Eric Dorland eric at moszumanska.debian.org
Sat Jan 30 05:34:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit 3092291ef9e35f1e80b5286732a56231a95a5999
Author: Mikhail Denisenko <denisenk at amazon.com>
Date:   Thu Nov 5 19:43:45 2015 -0500

    Fixed testing on Mac
---
 tests/common.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/common.sh b/tests/common.sh
old mode 100644
new mode 100755
index 9996f4f..d51e8df
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -19,7 +19,7 @@
 
 mkdir -p $outdir
 
-for i in /usr/lib64/pkcs11 /usr/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm;do
+for i in /usr/lib64/pkcs11 /usr/lib/softhsm /usr/local/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /usr/lib /usr/lib64/softhsm;do
 	if test -f "$i/libsofthsm2.so"; then
 		ADDITIONAL_PARAM="$i/libsofthsm2.so"
 		break
@@ -31,7 +31,7 @@ for i in /usr/lib64/pkcs11 /usr/lib/softhsm /usr/lib/x86_64-linux-gnu/softhsm /u
 	fi
 done
 
-if ! test -x /usr/bin/pkcs11-tool;then
+if (! test -x /usr/bin/pkcs11-tool && ! test -x /usr/local/bin/pkcs11-tool);then
 	exit 77
 fi
 
@@ -39,6 +39,11 @@ init_card () {
 	PIN="$1"
 	PUK="$2"
 
+	if test -x "/usr/local/bin/softhsm2-util"; then
+		export SOFTHSM2_CONF="$outdir/softhsm-testpkcs11.config"
+		SOFTHSM_TOOL="/usr/local/bin/softhsm2-util"
+	fi
+
 	if test -x "/usr/bin/softhsm2-util"; then
 		export SOFTHSM2_CONF="$outdir/softhsm-testpkcs11.config"
 		SOFTHSM_TOOL="/usr/bin/softhsm2-util"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list