annotate test/runtime/7158988/TestFieldMonitor.sh @ 3985:83b6305a5638

7191926: Remove MKS dependency in Hotspot regression tests Summary: Add case for CYGWIN in .sh files. Reviewed-by: coleenp, kvn Contributed-by: pavel.punegov@oracle.com
author coleenp
date Wed, 29 Aug 2012 14:49:05 -0400
parents 6acee021f5ac
children
rev   line source
coleenp@3666 1 #!/bin/sh
coleenp@3666 2
coleenp@3666 3 if [ "${TESTSRC}" = "" ]
coleenp@3666 4 then TESTSRC=.
coleenp@3666 5 fi
coleenp@3666 6
coleenp@3666 7 if [ "${TESTJAVA}" = "" ]
coleenp@3666 8 then
coleenp@3666 9 PARENT=`dirname \`which java\``
coleenp@3666 10 TESTJAVA=`dirname ${PARENT}`
coleenp@3666 11 echo "TESTJAVA not set, selecting " ${TESTJAVA}
coleenp@3666 12 echo "If this is incorrect, try setting the variable manually."
coleenp@3666 13 fi
coleenp@3666 14
coleenp@3666 15 if [ "${TESTCLASSES}" = "" ]
coleenp@3666 16 then
coleenp@3666 17 echo "TESTCLASSES not set. Test cannot execute. Failed."
coleenp@3666 18 exit 1
coleenp@3666 19 fi
coleenp@3666 20
coleenp@3666 21 # set platform-dependent variables
coleenp@3666 22 OS=`uname -s`
coleenp@3666 23 case "$OS" in
coleenp@3948 24 SunOS | Linux | Darwin)
coleenp@3666 25 NULL=/dev/null
coleenp@3666 26 PS=":"
coleenp@3666 27 FS="/"
coleenp@3666 28 ;;
coleenp@3666 29 Windows_95 | Windows_98 | Windows_ME )
coleenp@3666 30 NULL=NUL
coleenp@3666 31 PS=";"
coleenp@3666 32 FS="\\"
coleenp@3666 33 echo "Test skipped, only for WinNT"
coleenp@3666 34 exit 0
coleenp@3666 35 ;;
coleenp@3666 36 Windows_NT )
coleenp@3666 37 NULL=NUL
coleenp@3666 38 PS=";"
coleenp@3666 39 FS="\\"
coleenp@3666 40 ;;
coleenp@3985 41 CYGWIN_NT* )
coleenp@3985 42 NULL=/dev/null
coleenp@3985 43 PS=";"
coleenp@3985 44 FS="/"
coleenp@3985 45 ;;
coleenp@3985 46 CYGWIN_* )
coleenp@3985 47 NULL=/dev/null
coleenp@3985 48 PS=";"
coleenp@3985 49 FS="/"
coleenp@3985 50 echo "Test skipped, only for WinNT"
coleenp@3985 51 exit 0
coleenp@3985 52 ;;
coleenp@3666 53 * )
coleenp@3666 54 echo "Unrecognized system!"
coleenp@3666 55 exit 1;
coleenp@3666 56 ;;
coleenp@3666 57 esac
coleenp@3666 58
coleenp@3666 59 #CLASSPATH=.${PS}${TESTCLASSES} ; export CLASSPATH
coleenp@3666 60
coleenp@3666 61 cp ${TESTSRC}${FS}*.java .
coleenp@3666 62
kevinw@3743 63 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -fullversion
coleenp@3666 64
coleenp@3666 65 ${TESTJAVA}${FS}bin${FS}javac -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar *.java
coleenp@3666 66
coleenp@3948 67 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath .${PS}$TESTJAVA${FS}lib${FS}tools.jar FieldMonitor > test.out
coleenp@3666 68
coleenp@3666 69 grep "A fatal error has been detected" test.out > ${NULL}
coleenp@3666 70 if [ $? = 0 ]; then
coleenp@3666 71 cat test.out
coleenp@3666 72 STATUS=1
coleenp@3666 73 fi
coleenp@3666 74
coleenp@3666 75 exit $STATUS