Mercurial > hg > truffle
annotate test/runtime/7110720/Test7110720.sh @ 6556:54821565b742
Remove unnecessary test folder definition
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Fri, 12 Oct 2012 16:47:18 -0700 |
parents | 1e76463170b3 |
children | 6acee021f5ac |
rev | line source |
---|---|
6150
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
1 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
2 # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
4 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
5 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
6 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
7 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
8 # @test Test7110720.sh |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
9 # @bug 7110720 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
10 # @summary improve VM configuration file loading |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
11 # @run shell Test7110720.sh |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
12 # |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
13 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
14 if [ "${TESTSRC}" = "" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
15 then TESTSRC=. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
16 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
17 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
18 if [ "${TESTJAVA}" = "" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
19 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
20 PARENT=`dirname \`which java\`` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
21 TESTJAVA=`dirname ${PARENT}` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
22 echo "TESTJAVA not set, selecting " ${TESTJAVA} |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
23 echo "If this is incorrect, try setting the variable manually." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
24 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
25 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
26 if [ "${TESTCLASSES}" = "" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
27 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
28 echo "TESTCLASSES not set. Test cannot execute. Failed." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
29 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
30 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
31 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
32 # Jtreg sets TESTVMOPTS which may include -d64 which is |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
33 # required to test a 64-bit JVM on some platforms. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
34 # If another test harness still creates HOME/JDK64BIT, |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
35 # we can recognise that. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
36 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
37 # set platform-dependent variables |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
38 OS=`uname -s` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
39 case "$OS" in |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
40 SunOS | Linux ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
41 FS="/" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
42 RM=/bin/rm |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
43 CP=/bin/cp |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
44 MV=/bin/mv |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
45 ## for solaris, linux it's HOME |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
46 FILE_LOCATION=$HOME |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
47 if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
48 then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
49 TESTVMOPTS=`cat ${FILE_LOCATION}${FS}JDK64BIT` |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
50 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
51 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
52 Windows_* ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
53 FS="\\" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
54 RM=rm |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
55 CP=cp |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
56 MV=mv |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
57 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
58 * ) |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
59 echo "Unrecognized system!" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
60 exit 1; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
61 ;; |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
62 esac |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
63 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
64 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
65 JAVA=${TESTJAVA}${FS}bin${FS}java |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
66 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
67 # Don't test debug builds, they do read the config files: |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
68 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "debug" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
69 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
70 echo Skipping test for debug build. |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
71 exit 0 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
72 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
73 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
74 ok=yes |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
75 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
76 $RM -f .hotspot_compiler .hotspotrc |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
77 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
78 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "garbage in" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
79 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
80 echo "FAILED: base case failure" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
81 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
82 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
83 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
84 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
85 echo "garbage in, garbage out" > .hotspot_compiler |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
86 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "garbage in" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
87 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
88 echo "FAILED: .hotspot_compiler was read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
89 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
90 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
91 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
92 $MV .hotspot_compiler hs_comp.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
93 ${JAVA} ${TESTVMOPTS} -XX:CompileCommandFile=hs_comp.txt -version 2>&1 | grep "garbage in" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
94 if [ "$?" = "1" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
95 echo "FAILED: explicit compiler command file not read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
96 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
97 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
98 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
99 $RM -f .hotspot_compiler hs_comp.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
100 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
101 echo "garbage" > .hotspotrc |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
102 ${JAVA} ${TESTVMOPTS} -version 2>&1 | grep "garbage" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
103 if [ "$?" = "0" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
104 echo "FAILED: .hotspotrc was read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
105 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
106 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
107 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
108 $MV .hotspotrc hs_flags.txt |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
109 ${JAVA} ${TESTVMOPTS} -XX:Flags=hs_flags.txt -version 2>&1 | grep "garbage" >/dev/null |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
110 if [ "$?" = "1" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
111 echo "FAILED: explicit flags file not read" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
112 ok=no |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
113 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
114 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
115 if [ "${ok}" = "no" ]; then |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
116 echo "Some tests failed." |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
117 exit 1 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
118 else |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
119 echo "Passed" |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
120 exit 0 |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
121 fi |
1e76463170b3
7110720: Issue with vm config file loadingIssue with vm config file loading
kamg
parents:
diff
changeset
|
122 |