hotspot/test/runtime/6626217/Test6626217.sh
author darcy
Mon, 07 Jul 2014 12:08:07 -0400
changeset 25476 b97716c4b5c9
parent 23862 55988ebc30c4
child 25924 4c3dd8541530
permissions -rw-r--r--
8048620: Remove unneeded/obsolete -source/-target options in hotspot tests Reviewed-by: dholmes, hseigel
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6467
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     1
# 
25476
b97716c4b5c9 8048620: Remove unneeded/obsolete -source/-target options in hotspot tests
darcy
parents: 23862
diff changeset
     2
#  Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
6467
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     3
#  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     4
# 
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     5
#  This code is free software; you can redistribute it and/or modify it
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     6
#  under the terms of the GNU General Public License version 2 only, as
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     7
#  published by the Free Software Foundation.
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     8
# 
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
     9
#  This code is distributed in the hope that it will be useful, but WITHOUT
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    10
#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    11
#  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    12
#  version 2 for more details (a copy is included in the LICENSE file that
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    13
#  accompanied this code).
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    14
# 
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    15
#  You should have received a copy of the GNU General Public License version
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    16
#  2 along with this work; if not, write to the Free Software Foundation,
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    17
#  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    18
# 
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    19
#  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    20
#  or visit www.oracle.com if you need additional information or have any
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    21
#  questions.
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    22
# 
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    23
21769
61c68af507c9 8028160: [TESTBUG] Exclude failing (runtime) jtreg tests using @ignore
hseigel
parents: 16457
diff changeset
    24
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    25
# @test @(#)Test6626217.sh
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    26
# @bug 6626217
43c2f12b4e90 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
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    28
# @run shell Test6626217.sh
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    29
#
16457
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    30
## some tests require path to find test source dir
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    31
if [ "${TESTSRC}" = "" ]
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    32
then
16457
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    33
  TESTSRC=${PWD}
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    34
  echo "TESTSRC not set.  Using "${TESTSRC}" as default"
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    35
fi
16457
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    36
echo "TESTSRC=${TESTSRC}"
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    37
## Adding common setup Variables for running shell tests.
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    38
. ${TESTSRC}/../../test_env.sh
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    39
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    40
JAVA=${TESTJAVA}${FS}bin${FS}java
16457
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    41
JAVAC=${COMPILEJAVA}${FS}bin${FS}javac
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    42
43c2f12b4e90 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
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    44
# (for the subsequent moves to work).
16457
92af83361777 8009152: A number of jtreg tests need review/improvement
collins
parents: 13523
diff changeset
    45
${CP} ${TESTSRC}${FS}* ${THIS_DIR}
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    46
43c2f12b4e90 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:
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    48
${RM} -f *.class *.impl many_loader.java
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    49
22538
5261297676ef 7015395: [TESTBUG] runtime/6626217/Test6626217.sh fails if compilation happens fast enough for timestamps to be equal.
gziemski
parents: 22234
diff changeset
    50
# Make sure that the compilation steps occurs in the future as not to allow fast systems
5261297676ef 7015395: [TESTBUG] runtime/6626217/Test6626217.sh fails if compilation happens fast enough for timestamps to be equal.
gziemski
parents: 22234
diff changeset
    51
# to copy and compile bug_21227.java so fast as to make the class and java have the same
5261297676ef 7015395: [TESTBUG] runtime/6626217/Test6626217.sh fails if compilation happens fast enough for timestamps to be equal.
gziemski
parents: 22234
diff changeset
    52
# time stamp, which later on would make the compilation step of many_loader.java fail
5261297676ef 7015395: [TESTBUG] runtime/6626217/Test6626217.sh fails if compilation happens fast enough for timestamps to be equal.
gziemski
parents: 22234
diff changeset
    53
sleep 2
5261297676ef 7015395: [TESTBUG] runtime/6626217/Test6626217.sh fails if compilation happens fast enough for timestamps to be equal.
gziemski
parents: 22234
diff changeset
    54
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    55
# Compile all the usual suspects, including the default 'many_loader'
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    56
${CP} many_loader1.java.foo many_loader.java
25476
b97716c4b5c9 8048620: Remove unneeded/obsolete -source/-target options in hotspot tests
darcy
parents: 23862
diff changeset
    57
${JAVAC} ${TESTJAVACOPTS} -Xlint *.java
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    58
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    59
# Rename the class files, so the custom loader (and not the system loader) will find it
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    60
${MV} from_loader2.class from_loader2.impl2
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    61
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    62
# Compile the next version of 'many_loader'
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    63
${MV} many_loader.class many_loader.impl1
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    64
${CP} many_loader2.java.foo many_loader.java
25476
b97716c4b5c9 8048620: Remove unneeded/obsolete -source/-target options in hotspot tests
darcy
parents: 23862
diff changeset
    65
${JAVAC} ${TESTJAVACOPTS} -Xlint many_loader.java
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    66
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    67
# Rename the class file, so the custom loader (and not the system loader) will find it
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    68
${MV} many_loader.class many_loader.impl2
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    69
${MV} many_loader.impl1 many_loader.class
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    70
${RM} many_loader.java
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    71
12729
684b5857e506 7157734: hotspot test scripts not testing 64-bit JVM under JPRT/JTREG.
kevinw
parents: 6467
diff changeset
    72
${JAVA} ${TESTVMOPTS} -Xverify -Xint -cp . bug_21227 >test.out 2>&1
6467
34dd26dce221 6942092: Loader-constraint test is failing
acorn
parents: 6257
diff changeset
    73
grep "loader constraint" test.out
6257
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    74
exit $?
43c2f12b4e90 6977952: Test: Sync missing tests from hs16.3 to hs17.x
asaha
parents:
diff changeset
    75