hotspot/test/compiler/6894807/Test6894807.sh
author asaha
Tue, 17 Aug 2010 22:52:50 -0700
changeset 6257 43c2f12b4e90
child 12729 684b5857e506
permissions -rw-r--r--
6977952: Test: Sync missing tests from hs16.3 to hs17.x Reviewed-by: wrockett
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     1
#!/bin/sh
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     2
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     3
if [ "${TESTSRC}" = "" ]
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     4
then TESTSRC=.
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     5
fi
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     6
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     7
if [ "${TESTJAVA}" = "" ]
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     8
then
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
     9
  PARENT=`dirname \`which java\``
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    10
  TESTJAVA=`dirname ${PARENT}`
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    11
  echo "TESTJAVA not set, selecting " ${TESTJAVA}
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    12
  echo "If this is incorrect, try setting the variable manually."
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    13
fi
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    14
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    15
if [ "${TESTCLASSES}" = "" ]
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    16
then
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    17
  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    18
  exit 1
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    19
fi
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    20
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    21
BIT_FLAG=""
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    22
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    23
# set platform-dependent variables
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    24
OS=`uname -s`
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    25
case "$OS" in
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    26
  SunOS | Linux )
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    27
    NULL=/dev/null
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    28
    PS=":"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    29
    FS="/"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    30
    ## for solaris, linux it's HOME
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    31
    FILE_LOCATION=$HOME
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    32
    if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ]
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    33
    then
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    34
        BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'`
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    35
    fi
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    36
    ;;
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    37
  Windows_* )
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    38
    NULL=NUL
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    39
    PS=";"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    40
    FS="\\"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    41
    ;;
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    42
  * )
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    43
    echo "Unrecognized system!"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    44
    exit 1;
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    45
    ;;
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    46
esac
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    47
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    48
JEMMYPATH=${CPAPPEND}
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    49
CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    50
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    51
THIS_DIR=`pwd`
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    52
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    53
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    54
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    55
${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -server IsInstanceTest > test.out 2>&1
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    56
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    57
cat test.out
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    58
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    59
grep "Failed at index" test.out
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    60
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    61
if [ $? = 0 ]
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    62
then
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    63
    echo "Test Failed"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    64
    exit 1
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    65
else
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    66
    echo "Test Passed"
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    67
    exit 0
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    68
fi