Mercurial > hg > graal-compiler
comparison test/compiler/7200264/Test7200264.sh @ 8831:04d6d4322c6a
8009152: A number of jtreg tests need review/improvement
Summary: Added a new test_env.txt file to capture common shell variable. Added concept of COMPILEJAVA for use when TESTJAVA is a JRE. If COMPILEJAVA not set then TESTJAVA will be the default with assumption it is a JDK.
Reviewed-by: kvn, brutisso, coleenp
author | collins |
---|---|
date | Wed, 27 Mar 2013 09:49:51 -0700 |
parents | 859c45fb8cea |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
8830:7ca101eef24a | 8831:04d6d4322c6a |
---|---|
21 # or visit www.oracle.com if you need additional information or have any | 21 # or visit www.oracle.com if you need additional information or have any |
22 # questions. | 22 # questions. |
23 # | 23 # |
24 # | 24 # |
25 | 25 |
26 ## some tests require path to find test source dir | |
26 if [ "${TESTSRC}" = "" ] | 27 if [ "${TESTSRC}" = "" ] |
27 then | 28 then |
28 echo "TESTSRC not set. Test cannot execute. Failed." | 29 TESTSRC=${PWD} |
29 exit 1 | 30 echo "TESTSRC not set. Using "${TESTSRC}" as default" |
30 fi | 31 fi |
31 echo "TESTSRC=${TESTSRC}" | 32 echo "TESTSRC=${TESTSRC}" |
32 if [ "${TESTJAVA}" = "" ] | 33 ## Adding common setup Variables for running shell tests. |
33 then | 34 . ${TESTSRC}/../../test_env.sh |
34 echo "TESTJAVA not set. Test cannot execute. Failed." | |
35 exit 1 | |
36 fi | |
37 echo "TESTJAVA=${TESTJAVA}" | |
38 if [ "${TESTCLASSES}" = "" ] | |
39 then | |
40 echo "TESTCLASSES not set. Test cannot execute. Failed." | |
41 exit 1 | |
42 fi | |
43 echo "TESTCLASSES=${TESTCLASSES}" | |
44 echo "CLASSPATH=${CLASSPATH}" | |
45 | |
46 # set platform-dependent variables | |
47 OS=`uname -s` | |
48 case "$OS" in | |
49 SunOS | Linux | Darwin ) | |
50 NULL=/dev/null | |
51 PS=":" | |
52 FS="/" | |
53 ;; | |
54 Windows_* ) | |
55 NULL=NUL | |
56 PS=";" | |
57 FS="\\" | |
58 ;; | |
59 CYGWIN_* ) | |
60 NULL=/dev/null | |
61 PS=";" | |
62 FS="/" | |
63 ;; | |
64 * ) | |
65 echo "Unrecognized system!" | |
66 exit 1; | |
67 ;; | |
68 esac | |
69 | |
70 | 35 |
71 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug" | 36 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug" |
72 | 37 |
73 # Only test fastdebug Server VM on x86 | 38 # Only test fastdebug Server VM on x86 |
74 if [ $? != 0 ] | 39 if [ $? != 0 ] |
86 else | 51 else |
87 SSE=4 | 52 SSE=4 |
88 fi | 53 fi |
89 | 54 |
90 cp ${TESTSRC}${FS}TestIntVect.java . | 55 cp ${TESTSRC}${FS}TestIntVect.java . |
91 ${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java | 56 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} -d . TestIntVect.java |
92 | 57 |
93 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1 | 58 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1 |
94 | 59 |
95 COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'` | 60 COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'` |
96 if [ $COUNT -lt 4 ] | 61 if [ $COUNT -lt 4 ] |