author | simonis |
Fri, 17 Jan 2014 21:54:30 +0100 | |
changeset 22602 | 0d9a07b0d7e9 |
parent 15254 | 3997a6f357cb |
child 23010 | 6dadb192ad81 |
permissions | -rw-r--r-- |
2 | 1 |
# |
14342
8435a30053c1
7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents:
12047
diff
changeset
|
2 |
# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 22 |
# |
23 |
||
24 |
# @test |
|
25 |
# @bug 4087295 4785472 |
|
26 |
# @summary Enable resolveClass() to accommodate package renaming. |
|
27 |
# This fix enables one to implement a resolveClass method that maps a |
|
28 |
# Serialiazable class within a serialization stream to the same class |
|
29 |
# in a different package within the JVM runtime. See run shell script |
|
30 |
# for instructions on how to run this test. |
|
31 |
||
32 |
||
33 |
if [ "${TESTJAVA}" = "" ] |
|
34 |
then |
|
35 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
|
36 |
exit 1 |
|
37 |
fi |
|
38 |
||
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
39 |
if [ "${COMPILEJAVA}" = "" ] ; then |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
40 |
COMPILEJAVA="${TESTJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
41 |
fi |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
42 |
|
2 | 43 |
|
44 |
OS=`uname -s` |
|
45 |
# Need to determine the classpath separator and filepath separator based on the |
|
46 |
# operating system. |
|
47 |
case "$OS" in |
|
22602
0d9a07b0d7e9
8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents:
15254
diff
changeset
|
48 |
SunOS | Linux | Darwin | AIX ) |
2 | 49 |
PS=":" ;; |
4656
bbf13888e57a
6910835: TESTS: 3 java/io run.sh tests fail when run on Windows XP CYGWIN
ohair
parents:
2
diff
changeset
|
50 |
Windows* | CYGWIN* ) |
2 | 51 |
PS=";" ;; |
52 |
* ) |
|
53 |
echo "Unrecognized system!" |
|
54 |
exit 1 ;; |
|
55 |
esac |
|
56 |
||
57 |
JAVA=${TESTJAVA}/bin/java |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
58 |
JAVAC=${COMPILEJAVA}/bin/javac |
2 | 59 |
MKDIR=mkdir |
60 |
RDEL="rm -r" |
|
61 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
62 |
if [ -d ${TESTCLASSES}/oclasses ] |
2 | 63 |
then |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
64 |
${RDEL} ${TESTCLASSES}/oclasses |
2 | 65 |
fi |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
66 |
if [ -d ${TESTCLASSES}/nclasses ] |
2 | 67 |
then |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
68 |
${RDEL} ${TESTCLASSES}/nclasses |
2 | 69 |
fi |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
70 |
if [ -d ${TESTCLASSES}/share ] |
2 | 71 |
then |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
72 |
${RDEL} ${TESTCLASSES}/share |
2 | 73 |
fi |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
74 |
if [ -f ${TESTCLASSES}/stream.ser ] |
2 | 75 |
then |
76 |
${RDEL} ${TESTCLASSES}/stream.ser |
|
77 |
fi |
|
78 |
||
79 |
mkdir ${TESTCLASSES}/oclasses |
|
80 |
mkdir ${TESTCLASSES}/share |
|
81 |
mkdir ${TESTCLASSES}/nclasses |
|
82 |
||
83 |
# Build sources |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
7668
diff
changeset
|
84 |
set -e |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
85 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}/share \ |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
86 |
${TESTSRC}/extension/ExtendedObjectInputStream.java |
2 | 87 |
CLASSPATH=${TESTCLASSES}/share; export CLASSPATH; |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
88 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}/oclasses \ |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
89 |
${TESTSRC}/test/SerialDriver.java |
2 | 90 |
CLASSPATH=${TESTCLASSES}/share; export CLASSPATH; |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
91 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}/nclasses \ |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
92 |
${TESTSRC}/install/SerialDriver.java |
2 | 93 |
|
94 |
# Run Case 1. Map test.SerialDriver within stream to install.SerialDriver. |
|
4656
bbf13888e57a
6910835: TESTS: 3 java/io run.sh tests fail when run on Windows XP CYGWIN
ohair
parents:
2
diff
changeset
|
95 |
CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; |
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14342
diff
changeset
|
96 |
${JAVA} ${TESTVMOPTS} test.SerialDriver -s |
4656
bbf13888e57a
6910835: TESTS: 3 java/io run.sh tests fail when run on Windows XP CYGWIN
ohair
parents:
2
diff
changeset
|
97 |
CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; |
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14342
diff
changeset
|
98 |
${JAVA} ${TESTVMOPTS} install.SerialDriver -d |
2 | 99 |
rm stream.ser |
100 |
||
101 |
# Run Case 2. Map install.SerialDriver within stream to test.SerialDriver. |
|
4656
bbf13888e57a
6910835: TESTS: 3 java/io run.sh tests fail when run on Windows XP CYGWIN
ohair
parents:
2
diff
changeset
|
102 |
CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; |
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14342
diff
changeset
|
103 |
${JAVA} ${TESTVMOPTS} install.SerialDriver -s |
4656
bbf13888e57a
6910835: TESTS: 3 java/io run.sh tests fail when run on Windows XP CYGWIN
ohair
parents:
2
diff
changeset
|
104 |
CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; |
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14342
diff
changeset
|
105 |
${JAVA} ${TESTVMOPTS} test.SerialDriver -d |