test/compiler/6894807/Test6894807.sh

Thu, 17 Apr 2014 16:09:08 -0700

author
amurillo
date
Thu, 17 Apr 2014 16:09:08 -0700
changeset 6635
49b5160951dd
parent 4022
83b6305a5638
child 6876
710a3c8b516e
permissions
-rw-r--r--

Added tag hs25.20-b11 for changeset b6a2ba7d3ea7

     1 #!/bin/sh
     3 if [ "${TESTSRC}" = "" ]
     4 then TESTSRC=.
     5 fi
     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
    15 if [ "${TESTCLASSES}" = "" ]
    16 then
    17   echo "TESTCLASSES not set.  Test cannot execute.  Failed."
    18   exit 1
    19 fi
    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_* )
    30     NULL=NUL
    31     PS=";"
    32     FS="\\"
    33     ;;
    34   CYGWIN_* )
    35     NULL=/dev/null
    36     PS=";"
    37     FS="/"
    38     ;;
    39   * )
    40     echo "Unrecognized system!"
    41     exit 1;
    42     ;;
    43 esac
    45 JEMMYPATH=${CPAPPEND}
    46 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
    48 THIS_DIR=`pwd`
    50 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -version
    52 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} IsInstanceTest > test.out 2>&1
    54 cat test.out
    56 grep "Failed at index" test.out
    58 if [ $? = 0 ]
    59 then
    60     echo "Test Failed"
    61     exit 1
    62 else
    63     echo "Test Passed"
    64     exit 0
    65 fi

mercurial