test/runtime/7158988/TestFieldMonitor.sh

Thu, 20 Sep 2012 13:44:28 -0700

author
katleman
date
Thu, 20 Sep 2012 13:44:28 -0700
changeset 4035
da0d652d0c2f
parent 4022
83b6305a5638
permissions
-rw-r--r--

Added tag jdk8-b57 for changeset d70102c4cb73

     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

mercurial