8059313: Enable keytool NSS test on Mac
authorweijun
Sun, 28 Sep 2014 10:42:50 +0800
changeset 26863 0f0d2cdda7d3
parent 26862 4334f28426c8
child 26864 3383e655118e
8059313: Enable keytool NSS test on Mac Reviewed-by: vinnie
jdk/test/sun/security/tools/keytool/autotest.sh
--- a/jdk/test/sun/security/tools/keytool/autotest.sh	Sat Sep 27 03:49:31 2014 +0000
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh	Sun Sep 28 10:42:50 2014 +0800
@@ -84,6 +84,11 @@
             "/usr/lib/nss/libsoftokn3.so"`
     fi
     ;;
+  Darwin )
+    LIBNAME=`find_one \
+            "/Applications/Firefox.app/Contents/MacOS/libsoftokn3.dylib" \
+            "/Applications/Thunderbird.app//Contents/MacOS/libsoftokn3.dylib"`
+    ;;
   * )
     echo "Will not run test on: ${OS}"
     exit 0;
@@ -95,6 +100,12 @@
   exit 0
 fi
 
+echo "Using NSS lib at $LIBNAME"
+
+if [ $OS = Darwin ]; then
+    export DYLD_LIBRARY_PATH=`dirname $LIBNAME`
+fi
+
 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . -XDignore.symbol.file \
         ${TESTSRC}${FS}KeyToolTest.java || exit 10