提交 0294e23e 编写于 作者: W weijun

7196855: autotest.sh fails on ubuntu because libsoftokn.so not found

Reviewed-by: vinnie
上级 83bf8fc8
......@@ -41,30 +41,35 @@ if [ "${TESTJAVA}" = "" ] ; then
exit 1
fi
find_one() {
for TARGET_FILE in $@; do
if [ -e "$TARGET_FILE" ]; then
echo $TARGET_FILE
return
fi
done
}
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS )
FS="/"
LIBNAME=libsoftokn3.so
ARCH=`isainfo`
case "$ARCH" in
sparc* )
NSSDIR="/usr/lib/mps"
;;
* )
echo "Will not run test on: Solaris ${ARCH}"
exit 0;
;;
esac
LIBNAME="/usr/lib/mps/libsoftokn3.so"
;;
Linux )
LIBNAME=libsoftokn3.so
ARCH=`uname -m`
FS="/"
case "$ARCH" in
i[3-6]86 )
NSSDIR="/usr/lib"
LIBNAME=`find_one \
"/usr/lib/libsoftokn3.so" \
"/usr/lib/i386-linux-gnu/nss/libsoftokn3.so"`
;;
x86_64 )
LIBNAME=`find_one \
"/usr/lib64/libsoftokn3.so" \
"/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so"`
;;
* )
echo "Will not run test on: Linux ${ARCH}"
......@@ -78,7 +83,13 @@ case "$OS" in
;;
esac
${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}KeyToolTest.java || exit 10
if [ "$LIBNAME" = "" ]; then
echo "Cannot find LIBNAME"
exit 1
fi
${TESTJAVA}${FS}bin${FS}javac -d . -XDignore.symbol.file \
${TESTSRC}${FS}KeyToolTest.java || exit 10
NSS=${TESTSRC}${FS}..${FS}..${FS}pkcs11${FS}nss
......@@ -91,7 +102,7 @@ chmod u+w key3.db
chmod u+w cert8.db
echo | ${TESTJAVA}${FS}bin${FS}java -Dnss \
-Dnss.lib=${NSSDIR}${FS}${LIBNAME} \
-Dnss.lib=${LIBNAME} \
KeyToolTest
status=$?
......@@ -105,4 +116,3 @@ rm KeyToolTest*.class
rm TestException.class
exit $status
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册