1 # |
1 # |
2 # Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. |
7 # published by the Free Software Foundation. |
50 TESTJAVA=`dirname $JAVAC_CMD`/.. |
50 TESTJAVA=`dirname $JAVAC_CMD`/.. |
51 fi |
51 fi |
52 echo TESTSRC=${TESTSRC} |
52 echo TESTSRC=${TESTSRC} |
53 echo TESTCLASSES=${TESTCLASSES} |
53 echo TESTCLASSES=${TESTCLASSES} |
54 echo TESTJAVA=${TESTJAVA} |
54 echo TESTJAVA=${TESTJAVA} |
|
55 echo CPAPPEND=${CPAPPEND} |
55 echo "" |
56 echo "" |
56 |
57 |
57 #DEBUG=sunpkcs11,pkcs11keystore |
58 #DEBUG=sunpkcs11,pkcs11keystore |
58 |
59 |
59 echo DEBUG=${DEBUG} |
60 echo DEBUG=${DEBUG} |
128 |
129 |
129 echo ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public |
130 echo ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public |
130 ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public |
131 ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public |
131 |
132 |
132 echo ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \ |
133 echo ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \ |
133 ${TESTCLASSES}${FS}pkcs11_softtoken |
134 ${TESTCLASSES}${FS}pkcs11_softtoken |
134 ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \ |
135 ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \ |
135 ${TESTCLASSES}${FS}pkcs11_softtoken |
136 ${TESTCLASSES}${FS}pkcs11_softtoken |
136 |
137 |
137 echo ${CHMOD} +w ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info |
138 echo ${CHMOD} +w ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info |
138 ${CHMOD} 600 ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info |
139 ${CHMOD} 600 ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info |
139 USED_FILE_LIST="${TESTCLASSES}${FS}pkcs11_softtoken" |
140 USED_FILE_LIST="${TESTCLASSES}${FS}pkcs11_softtoken" |
140 fi |
141 fi |
141 |
142 |
142 # run test |
143 # run test |
143 cd ${TESTSRC} |
144 cd ${TESTSRC} |
144 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \ |
145 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \ |
145 -DDIR=${TESTSRC}${FS}BasicData${FS} \ |
146 -DDIR=${TESTSRC}${FS}BasicData${FS} \ |
146 -classpath \ |
147 -classpath \ |
147 ${TESTCLASSES}${PS}${TESTCLASSES}${FS}..${PS}${TESTSRC}${FS}loader.jar \ |
148 ${TESTCLASSES}${PS}${TESTCLASSES}${FS}..${PS}${TESTSRC}${FS}loader.jar${PS}${CPAPPEND} \ |
148 -DCUSTOM_DB_DIR=${TESTCLASSES} \ |
149 -DCUSTOM_DB_DIR=${TESTCLASSES} \ |
149 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \ |
150 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \ |
150 -DNO_DEFAULT=true \ |
151 -DNO_DEFAULT=true \ |
151 -DNO_DEIMOS=true \ |
152 -DNO_DEIMOS=true \ |
152 -DTOKEN=${token} \ |
153 -DTOKEN=${token} \ |
153 -Djava.security.debug=${DEBUG} \ |
154 -Djava.security.debug=${DEBUG} \ |
154 SecretKeysBasic |
155 SecretKeysBasic |
155 |
156 |
156 # -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \ |
157 # -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \ |
157 |
158 |
158 # save error status |
159 # save error status |
159 if [ $? != 0 ] |
160 if [ $? != 0 ] |