24 # @test
25 # @bug 5070773
26 # @summary SunPKCS11 provider does not support spaces config's provider name
27 # @run shell ConfigQuotedString.sh
28
29 # set a few environment variables so that the shell-script can run stand-alone
30 # in the source directory
31
32 # if running by hand on windows, change TESTSRC and TESTCLASSES to "."
33 if [ "${TESTSRC}" = "" ] ; then
34 TESTSRC=`pwd`
35 fi
36 if [ "${TESTCLASSES}" = "" ] ; then
37 TESTCLASSES=`pwd`
38 fi
39
40 # if running by hand on windows, change this to appropriate value
41 if [ "${TESTJAVA}" = "" ] ; then
42 TESTJAVA="/net/radiant/export1/charlie/mustang/build/solaris-sparc"
43 fi
44 echo TESTSRC=${TESTSRC}
45 echo TESTCLASSES=${TESTCLASSES}
46 echo TESTJAVA=${TESTJAVA}
47 echo ""
48
49 # let java test exit if platform unsupported
50
51 OS=`uname -s`
52 case "$OS" in
53 SunOS )
54 FS="/"
55 PS=":"
56 CP="${FS}bin${FS}cp"
57 CHMOD="${FS}bin${FS}chmod"
58 ;;
59 Linux )
60 FS="/"
61 PS=":"
62 CP="${FS}bin${FS}cp"
63 CHMOD="${FS}bin${FS}chmod"
64 ;;
65 Darwin )
66 FS="/"
75 CHMOD="chmod"
76 ;;
77 CYGWIN* )
78 FS="/"
79 PS=";"
80 CP="cp"
81 CHMOD="chmod"
82 #
83 # javac does not like /cygdrive produced by `pwd`
84 #
85 TESTSRC=`cygpath -d ${TESTSRC}`
86 ;;
87 * )
88 echo "Unrecognized system!"
89 exit 1;
90 ;;
91 esac
92
93 # compile test
94
95 ${TESTJAVA}${FS}bin${FS}javac \
96 -classpath ${TESTSRC}${FS}.. \
97 -d ${TESTCLASSES} \
98 ${TESTSRC}${FS}ConfigQuotedString.java
99
100 # run test
101
102 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
103 -classpath ${TESTCLASSES} \
104 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}ConfigQuotedString-nss.txt \
105 -Dtest.src=${TESTSRC} \
106 -Dtest.classes=${TESTCLASSES} \
107 ConfigQuotedString
108
109 # save error status
110 status=$?
111
112 # return
113 exit $status
|
24 # @test
25 # @bug 5070773
26 # @summary SunPKCS11 provider does not support spaces config's provider name
27 # @run shell ConfigQuotedString.sh
28
29 # set a few environment variables so that the shell-script can run stand-alone
30 # in the source directory
31
32 # if running by hand on windows, change TESTSRC and TESTCLASSES to "."
33 if [ "${TESTSRC}" = "" ] ; then
34 TESTSRC=`pwd`
35 fi
36 if [ "${TESTCLASSES}" = "" ] ; then
37 TESTCLASSES=`pwd`
38 fi
39
40 # if running by hand on windows, change this to appropriate value
41 if [ "${TESTJAVA}" = "" ] ; then
42 TESTJAVA="/net/radiant/export1/charlie/mustang/build/solaris-sparc"
43 fi
44 if [ "${COMPILEJAVA}" = "" ]; then
45 COMPILEJAVA="${TESTJAVA}"
46 fi
47 echo TESTSRC=${TESTSRC}
48 echo TESTCLASSES=${TESTCLASSES}
49 echo TESTJAVA=${TESTJAVA}
50 echo COMPILEJAVA=${COMPILEJAVA}
51 echo ""
52
53 # let java test exit if platform unsupported
54
55 OS=`uname -s`
56 case "$OS" in
57 SunOS )
58 FS="/"
59 PS=":"
60 CP="${FS}bin${FS}cp"
61 CHMOD="${FS}bin${FS}chmod"
62 ;;
63 Linux )
64 FS="/"
65 PS=":"
66 CP="${FS}bin${FS}cp"
67 CHMOD="${FS}bin${FS}chmod"
68 ;;
69 Darwin )
70 FS="/"
79 CHMOD="chmod"
80 ;;
81 CYGWIN* )
82 FS="/"
83 PS=";"
84 CP="cp"
85 CHMOD="chmod"
86 #
87 # javac does not like /cygdrive produced by `pwd`
88 #
89 TESTSRC=`cygpath -d ${TESTSRC}`
90 ;;
91 * )
92 echo "Unrecognized system!"
93 exit 1;
94 ;;
95 esac
96
97 # compile test
98
99 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
100 -classpath ${TESTSRC}${FS}.. \
101 -d ${TESTCLASSES} \
102 ${TESTSRC}${FS}ConfigQuotedString.java
103
104 # run test
105
106 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
107 -classpath ${TESTCLASSES} \
108 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}ConfigQuotedString-nss.txt \
109 -Dtest.src=${TESTSRC} \
110 -Dtest.classes=${TESTCLASSES} \
111 ConfigQuotedString
112
113 # save error status
114 status=$?
115
116 # return
117 exit $status
|