Thu, 13 Dec 2012 09:05:20 -0800
Added tag jdk8-b68 for changeset 121aa71316af
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_95 | Windows_98 | Windows_ME )
30 NULL=NUL
31 PS=";"
32 FS="\\"
33 echo "Test skipped, only for WinNT"
34 exit 0
35 ;;
36 Windows_NT )
37 NULL=NUL
38 PS=";"
39 FS="\\"
40 ;;
41 CYGWIN_NT* )
42 NULL=/dev/null
43 PS=";"
44 FS="/"
45 ;;
46 CYGWIN_* )
47 NULL=/dev/null
48 PS=";"
49 FS="/"
50 echo "Test skipped, only for WinNT"
51 exit 0
52 ;;
53 * )
54 echo "Unrecognized system!"
55 exit 1;
56 ;;
57 esac
59 #CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH
61 cp ${TESTSRC}${FS}*.java .
63 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
65 ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java
67 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out
69 grep "A fatal error has been detected" test.out > ${NULL}
70 if [ $? = 0 ]; then
71 cat test.out
72 STATUS=1
73 fi
75 exit $STATUS