changeset 20762:7ec392af43cd

8026235: keytool NSS test should use 64 bit lib on Solaris Reviewed-by: vinnie
author weijun
date Thu, 10 Oct 2013 15:24:41 +0800
parents b14f02adbe01
children 95cf1b4945f4
files jdk/test/sun/security/tools/keytool/autotest.sh
diffstat 1 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/sun/security/tools/keytool/autotest.sh	Thu Oct 10 09:01:19 2013 +0200
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh	Thu Oct 10 15:24:41 2013 +0800
@@ -53,18 +53,27 @@
   done
 }
 
+FS="/"
+${TESTJAVA}${FS}bin${FS}java -XshowSettings:properties -version 2> allprop
+cat allprop | grep sun.arch.data.model | grep 32
+if [ "$?" != "0" ]; then
+  B32=false
+else
+  B32=true
+fi
+
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
   SunOS )
-    FS="/"
-    LIBNAME="/usr/lib/mps/libsoftokn3.so"
+    if [ $B32 = true ]; then
+      LIBNAME="/usr/lib/mps/libsoftokn3.so"
+    else
+      LIBNAME="/usr/lib/mps/64/libsoftokn3.so"
+    fi
     ;;
   Linux )
-    FS="/"
-    ${TESTJAVA}${FS}bin${FS}java -XshowSettings:properties -version 2> allprop
-    cat allprop | grep os.arch | grep 64
-    if [ "$?" != "0" ]; then
+    if [ $B32 = true ]; then
         LIBNAME=`find_one \
             "/usr/lib/libsoftokn3.so" \
             "/usr/lib/i386-linux-gnu/nss/libsoftokn3.so"`
@@ -82,7 +91,7 @@
 
 if [ "$LIBNAME" = "" ]; then
   echo "Cannot find libsoftokn3.so"
-  exit 1
+  exit 0
 fi
 
 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . -XDignore.symbol.file \