hotspot/test/runtime/7158988/TestFieldMonitor.sh
changeset 15631 ad9db22b3490
parent 15630 f644cf0bda45
parent 15572 d17eb2e13e36
child 15632 3d36eadad78f
equal deleted inserted replaced
15630:f644cf0bda45 15631:ad9db22b3490
     1 #!/bin/sh
       
     2 
       
     3 if [ "${TESTSRC}" = "" ]
       
     4 then TESTSRC=.
       
     5 fi
       
     6 
       
     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
       
    14 
       
    15 if [ "${TESTCLASSES}" = "" ]
       
    16 then
       
    17   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
       
    18   exit 1
       
    19 fi
       
    20 
       
    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
       
    58 
       
    59 #CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH
       
    60 
       
    61 cp ${TESTSRC}${FS}*.java .
       
    62 
       
    63 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
       
    64 
       
    65 ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java
       
    66 
       
    67 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out
       
    68 
       
    69 grep "A fatal error has been detected" test.out > ${NULL}
       
    70 if [ $? = 0 ]; then
       
    71     cat test.out
       
    72     STATUS=1
       
    73 fi
       
    74 
       
    75 exit $STATUS