Mercurial > hg > truffle
annotate test/runtime/6626217/Test6626217.sh @ 8171:2ba078b2d311
Merge.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 07 Mar 2013 17:36:09 +0100 |
parents | 83b6305a5638 |
children | 04d6d4322c6a |
rev | line source |
---|---|
1797 | 1 # |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
1797
diff
changeset
|
2 # Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
1797 | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | |
5 # This code is free software; you can redistribute it and/or modify it | |
6 # under the terms of the GNU General Public License version 2 only, as | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 # or visit www.oracle.com if you need additional information or have any | |
21 # questions. | |
22 # | |
1715 | 23 |
1797 | 24 |
1715 | 25 # @test @(#)Test6626217.sh |
26 # @bug 6626217 | |
27 # @summary Loader-constraint table allows arrays instead of only the base-classes | |
28 # @run shell Test6626217.sh | |
29 # | |
30 | |
31 if [ "${TESTSRC}" = "" ] | |
32 then TESTSRC=. | |
33 fi | |
34 | |
35 if [ "${TESTJAVA}" = "" ] | |
36 then | |
37 PARENT=`dirname \`which java\`` | |
38 TESTJAVA=`dirname ${PARENT}` | |
39 echo "TESTJAVA not set, selecting " ${TESTJAVA} | |
40 echo "If this is incorrect, try setting the variable manually." | |
41 fi | |
42 | |
43 if [ "${TESTCLASSES}" = "" ] | |
44 then | |
45 echo "TESTCLASSES not set. Test cannot execute. Failed." | |
46 exit 1 | |
47 fi | |
48 | |
49 # set platform-dependent variables | |
50 OS=`uname -s` | |
51 case "$OS" in | |
6598
6acee021f5ac
7129723: MAC: Some regression tests need to recognize Mac OS X platform
coleenp
parents:
6074
diff
changeset
|
52 SunOS | Linux | Darwin ) |
1715 | 53 NULL=/dev/null |
54 PS=":" | |
55 FS="/" | |
56 RM=/bin/rm | |
57 CP=/bin/cp | |
58 MV=/bin/mv | |
59 ;; | |
60 Windows_* ) | |
61 NULL=NUL | |
62 PS=";" | |
63 FS="\\" | |
64 RM=rm | |
65 CP=cp | |
66 MV=mv | |
67 ;; | |
6635
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
68 CYGWIN_* ) |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
69 NULL=/dev/null |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
70 PS=";" |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
71 FS="/" |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
72 RM=rm |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
73 CP=cp |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
74 MV=mv |
83b6305a5638
7191926: Remove MKS dependency in Hotspot regression tests
coleenp
parents:
6598
diff
changeset
|
75 ;; |
1715 | 76 * ) |
77 echo "Unrecognized system!" | |
78 exit 1; | |
79 ;; | |
80 esac | |
81 | |
82 JEMMYPATH=${CPAPPEND} | |
83 CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH | |
84 | |
85 THIS_DIR=`pwd` | |
86 | |
87 JAVA=${TESTJAVA}${FS}bin${FS}java | |
88 JAVAC=${TESTJAVA}${FS}bin${FS}javac | |
89 | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
1797
diff
changeset
|
90 ${JAVA} ${TESTVMOPTS} -version |
1715 | 91 |
92 # Current directory is scratch directory, copy all the test source there | |
93 # (for the subsequent moves to work). | |
94 ${CP} ${TESTSRC}${FS}* ${THIS_DIR} | |
95 | |
96 # A Clean Compile: this line will probably fail within jtreg as have a clean dir: | |
97 ${RM} -f *.class *.impl many_loader.java | |
98 | |
99 # Compile all the usual suspects, including the default 'many_loader' | |
100 ${CP} many_loader1.java.foo many_loader.java | |
101 ${JAVAC} -source 1.4 -target 1.4 -Xlint *.java | |
102 | |
103 # Rename the class files, so the custom loader (and not the system loader) will find it | |
104 ${MV} from_loader2.class from_loader2.impl2 | |
105 | |
106 # Compile the next version of 'many_loader' | |
107 ${MV} many_loader.class many_loader.impl1 | |
108 ${CP} many_loader2.java.foo many_loader.java | |
109 ${JAVAC} -source 1.4 -target 1.4 -Xlint many_loader.java | |
110 | |
111 # Rename the class file, so the custom loader (and not the system loader) will find it | |
112 ${MV} many_loader.class many_loader.impl2 | |
113 ${MV} many_loader.impl1 many_loader.class | |
114 ${RM} many_loader.java | |
115 | |
6074
037973617842
7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents:
1797
diff
changeset
|
116 ${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&1 |
1797 | 117 grep "loader constraint" test.out |
1715 | 118 exit $? |
119 |