annotate test/runtime/7020373/Test7020373.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 fe94b4e7212b
children 4071984ef4ea
rev   line source
kamg@2521 1 #!/bin/sh
kamg@2521 2
kamg@2521 3 ##
kamg@2521 4 ## @test
asaha@3908 5 ## @bug 7020373 7055247 7053586 7185550
kamg@2521 6 ## @key cte_test
kamg@2521 7 ## @summary JSR rewriting can overflow memory address size variables
asaha@3908 8 ## @ignore Ignore it as 7053586 test uses lots of memory. See bug report for detail.
kamg@2521 9 ## @run shell Test7020373.sh
kamg@2521 10 ##
kamg@2521 11
kamg@2521 12 if [ "${TESTSRC}" = "" ]
kamg@2521 13 then TESTSRC=.
kamg@2521 14 fi
kamg@2521 15
kamg@2521 16 if [ "${TESTJAVA}" = "" ]
kamg@2521 17 then
kamg@2521 18 PARENT=`dirname \`which java\``
kamg@2521 19 TESTJAVA=`dirname ${PARENT}`
kamg@2521 20 echo "TESTJAVA not set, selecting " ${TESTJAVA}
kamg@2521 21 echo "If this is incorrect, try setting the variable manually."
kamg@2521 22 fi
kamg@2521 23
kamg@2521 24 if [ "${TESTCLASSES}" = "" ]
kamg@2521 25 then
kamg@2521 26 echo "TESTCLASSES not set. Test cannot execute. Failed."
kamg@2521 27 exit 1
kamg@2521 28 fi
kamg@2521 29
kamg@2521 30 # set platform-dependent variables
kamg@2521 31 OS=`uname -s`
kamg@2521 32 case "$OS" in
asaha@3896 33 SunOS | Linux | Darwin )
kamg@2521 34 NULL=/dev/null
kamg@2521 35 PS=":"
kamg@2521 36 FS="/"
kamg@2521 37 ;;
kamg@2521 38 Windows_* )
kamg@2521 39 NULL=NUL
kamg@2521 40 PS=";"
kamg@2521 41 FS="\\"
kamg@2521 42 ;;
coleenp@3985 43 CYGWIN_* )
coleenp@3985 44 NULL=/dev/null
coleenp@3985 45 PS=";"
coleenp@3985 46 FS="/"
coleenp@3985 47 ;;
kamg@2521 48 * )
kamg@2521 49 echo "Unrecognized system!"
kamg@2521 50 exit 1;
kamg@2521 51 ;;
kamg@2521 52 esac
kamg@2521 53
kamg@2521 54 JEMMYPATH=${CPAPPEND}
kamg@2521 55 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
kamg@2521 56
kamg@2521 57 THIS_DIR=`pwd`
kamg@2521 58
kevinw@3743 59 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
kamg@2521 60
kamg@2521 61 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
kamg@2521 62
kevinw@3743 63 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1
kamg@2521 64
kamg@2521 65 cat test.out
kamg@2521 66
kamg@2521 67 egrep "SIGSEGV|An unexpected error has been detected" test.out
kamg@2521 68
kamg@2521 69 if [ $? = 0 ]
kamg@2521 70 then
kamg@2521 71 echo "Test Failed"
kamg@2521 72 exit 1
kamg@2521 73 else
asaha@3896 74 egrep "java.lang.LinkageError|java.lang.NoSuchMethodError|Main method not found in class OOMCrashClass4000_1|insufficient memory" test.out
kamg@2521 75 if [ $? = 0 ]
kamg@2521 76 then
kamg@2521 77 echo "Test Passed"
kamg@2521 78 exit 0
kamg@2521 79 else
kamg@2521 80 echo "Test Failed"
kamg@2521 81 exit 1
kamg@2521 82 fi
kamg@2521 83 fi