annotate test/runtime/7020373/Test7020373.sh @ 3908:fe94b4e7212b

7185550: TEST: runtime/7020373/Test7020373.sh fails because there is no test/runtime/7020373/testcase.jar Reviewed-by: coleenp
author asaha
date Mon, 23 Jul 2012 14:28:38 -0700
parents 149c36689fcb
children 83b6305a5638
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 ;;
kamg@2521 43 * )
kamg@2521 44 echo "Unrecognized system!"
kamg@2521 45 exit 1;
kamg@2521 46 ;;
kamg@2521 47 esac
kamg@2521 48
kamg@2521 49 JEMMYPATH=${CPAPPEND}
kamg@2521 50 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
kamg@2521 51
kamg@2521 52 THIS_DIR=`pwd`
kamg@2521 53
kevinw@3743 54 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
kamg@2521 55
kamg@2521 56 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
kamg@2521 57
kevinw@3743 58 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass4000_1 > test.out 2>&1
kamg@2521 59
kamg@2521 60 cat test.out
kamg@2521 61
kamg@2521 62 egrep "SIGSEGV|An unexpected error has been detected" test.out
kamg@2521 63
kamg@2521 64 if [ $? = 0 ]
kamg@2521 65 then
kamg@2521 66 echo "Test Failed"
kamg@2521 67 exit 1
kamg@2521 68 else
asaha@3896 69 egrep "java.lang.LinkageError|java.lang.NoSuchMethodError|Main method not found in class OOMCrashClass4000_1|insufficient memory" test.out
kamg@2521 70 if [ $? = 0 ]
kamg@2521 71 then
kamg@2521 72 echo "Test Passed"
kamg@2521 73 exit 0
kamg@2521 74 else
kamg@2521 75 echo "Test Failed"
kamg@2521 76 exit 1
kamg@2521 77 fi
kamg@2521 78 fi