annotate test/runtime/6626217/Test6626217.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 83b6305a5638
children e567d5afd4dd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1797
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
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
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
4 #
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
5 # This code is free software; you can redistribute it and/or modify it
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
6 # under the terms of the GNU General Public License version 2 only, as
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
7 # published by the Free Software Foundation.
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
8 #
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
9 # This code is distributed in the hope that it will be useful, but WITHOUT
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
12 # version 2 for more details (a copy is included in the LICENSE file that
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
13 # accompanied this code).
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
14 #
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
15 # You should have received a copy of the GNU General Public License version
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
16 # 2 along with this work; if not, write to the Free Software Foundation,
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
18 #
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
20 # or visit www.oracle.com if you need additional information or have any
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
21 # questions.
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
22 #
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
23
1797
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
24
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
25 # @test @(#)Test6626217.sh
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
26 # @bug 6626217
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
27 # @summary Loader-constraint table allows arrays instead of only the base-classes
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
28 # @run shell Test6626217.sh
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
29 #
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
30 ## some tests require path to find test source dir
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
31 if [ "${TESTSRC}" = "" ]
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
32 then
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
33 TESTSRC=${PWD}
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
34 echo "TESTSRC not set. Using "${TESTSRC}" as default"
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
35 fi
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
36 echo "TESTSRC=${TESTSRC}"
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
37 ## Adding common setup Variables for running shell tests.
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
38 . ${TESTSRC}/../../test_env.sh
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
39
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
40 JAVA=${TESTJAVA}${FS}bin${FS}java
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
41 JAVAC=${COMPILEJAVA}${FS}bin${FS}javac
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
42
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
43 # Current directory is scratch directory, copy all the test source there
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
44 # (for the subsequent moves to work).
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
45 ${CP} ${TESTSRC}${FS}* ${THIS_DIR}
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
46
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
47 # A Clean Compile: this line will probably fail within jtreg as have a clean dir:
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
48 ${RM} -f *.class *.impl many_loader.java
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
49
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
50 # Compile all the usual suspects, including the default 'many_loader'
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
51 ${CP} many_loader1.java.foo many_loader.java
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
52 ${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint *.java
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
53
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
54 # Rename the class files, so the custom loader (and not the system loader) will find it
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
55 ${MV} from_loader2.class from_loader2.impl2
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
56
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
57 # Compile the next version of 'many_loader'
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
58 ${MV} many_loader.class many_loader.impl1
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
59 ${CP} many_loader2.java.foo many_loader.java
8831
04d6d4322c6a 8009152: A number of jtreg tests need review/improvement
collins
parents: 6635
diff changeset
60 ${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint many_loader.java
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
61
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
62 # Rename the class file, so the custom loader (and not the system loader) will find it
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
63 ${MV} many_loader.class many_loader.impl2
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
64 ${MV} many_loader.impl1 many_loader.class
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
65 ${RM} many_loader.java
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
66
6074
037973617842 7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents: 1797
diff changeset
67 ${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&1
1797
883a82d6d41d 6942092: Loader-constraint test is failing
acorn
parents: 1715
diff changeset
68 grep "loader constraint" test.out
1715
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
69 exit $?
495caa35b1b5 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
70