test/runtime/6878713/Test6878713.sh

Wed, 29 Aug 2012 14:49:05 -0400

author
coleenp
date
Wed, 29 Aug 2012 14:49:05 -0400
changeset 4022
83b6305a5638
parent 3985
6acee021f5ac
child 4802
eca90b8a06eb
child 4831
04d6d4322c6a
permissions
-rw-r--r--

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

     1 #!/bin/sh
     3 ##
     4 ## @test
     5 ## @bug 6878713
     6 ## @summary Verifier heap corruption, relating to backward jsrs
     7 ## @run shell/timeout=120 Test6878713.sh
     8 ##
    10 if [ "${TESTSRC}" = "" ]
    11 then TESTSRC=.
    12 fi
    14 if [ "${TESTJAVA}" = "" ]
    15 then
    16   PARENT=`dirname \`which java\``
    17   TESTJAVA=`dirname ${PARENT}`
    18   echo "TESTJAVA not set, selecting " ${TESTJAVA}
    19   echo "If this is incorrect, try setting the variable manually."
    20 fi
    22 if [ "${TESTCLASSES}" = "" ]
    23 then
    24   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
    25   exit 1
    26 fi
    28 # set platform-dependent variables
    29 OS=`uname -s`
    30 case "$OS" in
    31   SunOS | Linux | Darwin )
    32     NULL=/dev/null
    33     PS=":"
    34     FS="/"
    35     ;;
    36   Windows_* )
    37     NULL=NUL
    38     PS=";"
    39     FS="\\"
    40     ;;
    41   CYGWIN_* )
    42     NULL=/dev/null
    43     PS=";"
    44     FS="/"
    45     ;;
    46   * )
    47     echo "Unrecognized system!"
    48     exit 1;
    49     ;;
    50 esac
    52 JEMMYPATH=${CPAPPEND}
    53 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
    55 THIS_DIR=`pwd`
    57 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
    59 ${TESTJAVA}${FS}bin${FS}jar xvf ${TESTSRC}${FS}testcase.jar
    61 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} OOMCrashClass1960_2 > test.out 2>&1
    63 if [ -s core -o -s "hs_*.log" ]
    64 then
    65     cat hs*.log
    66     echo "Test Failed"
    67     exit 1
    68 else
    69     echo "Test Passed"
    70     exit 0
    71 fi

mercurial