From c224b0c82469989f2dc821d919921b54eae7242d Mon Sep 17 00:00:00 2001 From: aj Date: Wed, 11 Jul 2007 09:15:45 +0000 Subject: [PATCH] allow regression test suite to work installed as well. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3215 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/tests/regression/functions | 43 ++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/tests/regression/functions b/src/tests/regression/functions index b7e289f7..401c2f53 100755 --- a/src/tests/regression/functions +++ b/src/tests/regression/functions @@ -9,21 +9,34 @@ if [ -z "$__p15init__" ]; then p15base=${P15_BASE:-../..} p15temp=${P15_TEMP:-./test-data} - osctool=$p15base/tools/opensc-tool - p15crypt=$p15base/tools/pkcs15-crypt - p15tool=$p15base/tools/pkcs15-tool - p15init=$p15base/tools/pkcs15-init - p15dump=$p15base/tests/p15dump - p11tool=$p15base/tools/pkcs11-tool - p11module=$p15base/pkcs11/.libs/opensc-pkcs11.so - p15log=$p15temp/test.log - terrlog=$p15temp/terror.log - - for bin in $osctool $p15tool $p15crypt $p15init $p11tool; do - test -x $bin && continue - echo "*** Missing binary $bin" >&2 - exit 1 - done + if [ "$1" == "--installed" ] + then + osctool=opensc-tool + p15crypt=pkcs15-crypt + p15tool=pkcs15-tool + p15init=pkcs15-init + p11tool=pkcs11-tool + p11module=/usr/lib/opensc-pkcs11.so + p15log=$p15temp/test.log + terrlog=$p15temp/terror.log + shift + else + osctool=$p15base/tools/opensc-tool + p15crypt=$p15base/tools/pkcs15-crypt + p15tool=$p15base/tools/pkcs15-tool + p15init=$p15base/tools/pkcs15-init + p15dump=$p15base/tests/p15dump + p11tool=$p15base/tools/pkcs11-tool + p11module=$p15base/pkcs11/.libs/opensc-pkcs11.so + p15log=$p15temp/test.log + terrlog=$p15temp/terror.log + + for bin in $osctool $p15tool $p15crypt $p15init $p11tool; do + test -x $bin && continue + echo "*** Missing binary $bin" >&2 + exit 1 + done + fi # Eat any arguments given on the command line while [ $# -ne 0 ]; do