acorn@2152: # mikael@6198: # Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. acorn@2152: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. acorn@2152: # acorn@2152: # This code is free software; you can redistribute it and/or modify it acorn@2152: # under the terms of the GNU General Public License version 2 only, as acorn@2152: # published by the Free Software Foundation. acorn@2152: # acorn@2152: # This code is distributed in the hope that it will be useful, but WITHOUT acorn@2152: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or acorn@2152: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License acorn@2152: # version 2 for more details (a copy is included in the LICENSE file that acorn@2152: # accompanied this code). acorn@2152: # acorn@2152: # You should have received a copy of the GNU General Public License version acorn@2152: # 2 along with this work; if not, write to the Free Software Foundation, acorn@2152: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. acorn@2152: # acorn@2152: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA acorn@2152: # or visit www.oracle.com if you need additional information or have any acorn@2152: # questions. acorn@2152: # asaha@2070: hseigel@6133: hseigel@6133: # @ignore 8028733 asaha@2070: # @test @(#)Test6626217.sh asaha@2070: # @bug 6626217 asaha@2070: # @summary Loader-constraint table allows arrays instead of only the base-classes asaha@2070: # @run shell Test6626217.sh asaha@2070: # collins@4831: ## some tests require path to find test source dir asaha@2070: if [ "${TESTSRC}" = "" ] collins@4831: then collins@4831: TESTSRC=${PWD} collins@4831: echo "TESTSRC not set. Using "${TESTSRC}" as default" asaha@2070: fi collins@4831: echo "TESTSRC=${TESTSRC}" collins@4831: ## Adding common setup Variables for running shell tests. collins@4831: . ${TESTSRC}/../../test_env.sh asaha@2070: asaha@2070: JAVA=${TESTJAVA}${FS}bin${FS}java collins@4831: JAVAC=${COMPILEJAVA}${FS}bin${FS}javac asaha@2070: asaha@2070: # Current directory is scratch directory, copy all the test source there asaha@2070: # (for the subsequent moves to work). collins@4831: ${CP} ${TESTSRC}${FS}* ${THIS_DIR} asaha@2070: asaha@2070: # A Clean Compile: this line will probably fail within jtreg as have a clean dir: asaha@2070: ${RM} -f *.class *.impl many_loader.java asaha@2070: asaha@2070: # Compile all the usual suspects, including the default 'many_loader' asaha@2070: ${CP} many_loader1.java.foo many_loader.java collins@4831: ${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint *.java asaha@2070: asaha@2070: # Rename the class files, so the custom loader (and not the system loader) will find it asaha@2070: ${MV} from_loader2.class from_loader2.impl2 asaha@2070: asaha@2070: # Compile the next version of 'many_loader' asaha@2070: ${MV} many_loader.class many_loader.impl1 asaha@2070: ${CP} many_loader2.java.foo many_loader.java collins@4831: ${JAVAC} ${TESTJAVACOPTS} -source 1.4 -target 1.4 -Xlint many_loader.java asaha@2070: asaha@2070: # Rename the class file, so the custom loader (and not the system loader) will find it asaha@2070: ${MV} many_loader.class many_loader.impl2 asaha@2070: ${MV} many_loader.impl1 many_loader.class asaha@2070: ${RM} many_loader.java asaha@2070: kevinw@3777: ${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&1 acorn@2152: grep "loader constraint" test.out asaha@2070: exit $? asaha@2070: