source: trunk/openjdk/hotspot/test/compiler/6894807/Test6894807.sh

Last change on this file was 278, checked in by dmik, 14 years ago

trunk: Merged in openjdk6 b22 from branches/vendor/oracle.

File size: 1.2 KB
Line 
1#!/bin/sh
2
3if [ "${TESTSRC}" = "" ]
4then TESTSRC=.
5fi
6
7if [ "${TESTJAVA}" = "" ]
8then
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."
13fi
14
15if [ "${TESTCLASSES}" = "" ]
16then
17 echo "TESTCLASSES not set. Test cannot execute. Failed."
18 exit 1
19fi
20
21BIT_FLAG=""
22
23# set platform-dependent variables
24OS=`uname -s`
25case "$OS" in
26 SunOS | Linux )
27 NULL=/dev/null
28 PS=":"
29 FS="/"
30 ## for solaris, linux it's HOME
31 FILE_LOCATION=$HOME
32 if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ]
33 then
34 BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'`
35 fi
36 ;;
37 Windows_* )
38 NULL=NUL
39 PS=";"
40 FS="\\"
41 ;;
42 * )
43 echo "Unrecognized system!"
44 exit 1;
45 ;;
46esac
47
48JEMMYPATH=${CPAPPEND}
49CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH
50
51THIS_DIR=`pwd`
52
53${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version
54
55${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -server IsInstanceTest > test.out 2>&1
56
57cat test.out
58
59grep "Failed at index" test.out
60
61if [ $? = 0 ]
62then
63 echo "Test Failed"
64 exit 1
65else
66 echo "Test Passed"
67 exit 0
68fi
Note: See TracBrowser for help on using the repository browser.