Wed, 22 Jan 2014 12:37:28 -0800
Added tag jdk8u5-b05 for changeset b90de55aca30
1 #!/bin/sh
3 if [ "${TESTSRC}" = "" ]
4 then TESTSRC=.
5 fi
7 if [ "${TESTJAVA}" = "" ]
8 then
9 PARENT=`dirname \`which java\``
10 TESTJAVA=`dirname ${PARENT}`
11 echo "TESTJAVA not set, selecting " ${TESTJAVA}
12 echo "If this is incorrect, try setting the variable manually."
13 fi
15 if [ "${TESTCLASSES}" = "" ]
16 then
17 echo "TESTCLASSES not set. Test cannot execute. Failed."
18 exit 1
19 fi
21 # set platform-dependent variables
22 OS=`uname -s`
23 case "$OS" in
24 SunOS | Linux | Darwin )
25 NULL=/dev/null
26 PS=":"
27 FS="/"
28 ;;
29 Windows_* )
30 NULL=NUL
31 PS=";"
32 FS="\\"
33 ;;
34 CYGWIN_* )
35 NULL=/dev/null
36 PS=";"
37 FS="/"
38 ;;
39 * )
40 echo "Unrecognized system!"
41 exit 1;
42 ;;
43 esac
45 JEMMYPATH=${CPAPPEND}
46 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
48 THIS_DIR=`pwd`
50 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
52 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} IsInstanceTest > test.out 2>&1
54 cat test.out
56 grep "Failed at index" test.out
58 if [ $? = 0 ]
59 then
60 echo "Test Failed"
61 exit 1
62 else
63 echo "Test Passed"
64 exit 0
65 fi