22 #
23 # @test
24 # @bug 4811968 6908628
25 # @summary Serialization compatibility with old versions (and fix)
26 # @author Weijun Wang
27 #
28 # set a few environment variables so that the shell-script can run stand-alone
29 # in the source directory
30
31 if [ "${TESTSRC}" = "" ] ; then
32 TESTSRC="."
33 fi
34 if [ "${TESTCLASSES}" = "" ] ; then
35 TESTCLASSES="."
36 fi
37 if [ "${TESTJAVA}" = "" ] ; then
38 echo "TESTJAVA not set. Test cannot execute."
39 echo "FAILED!!!"
40 exit 1
41 fi
42
43 # set platform-dependent variables
44 PF=""
45
46 OS=`uname -s`
47 case "$OS" in
48 SunOS )
49 FS="/"
50 ARCH=`isainfo`
51 case "$ARCH" in
52 sparc* )
53 PF="solaris-sparc"
54 ;;
55 i[3-6]86 )
56 PF="solaris-i586"
57 ;;
58 amd64* )
59 PF="solaris-amd64"
60 ;;
61 * )
86
87 # 'uname -m' does not give us enough information -
88 # should rely on $PROCESSOR_IDENTIFIER (as is done in Defs-windows.gmk),
89 # but JTREG does not pass this env variable when executing a shell script.
90 #
91 # execute test program - rely on it to exit if platform unsupported
92
93 ;;
94 * )
95 echo "Unsupported System: ${OS}"
96 exit 0;
97 ;;
98 esac
99
100 echo "==================================================="
101 echo "Try to set ALT_JAVA_RE_JDK if you see timeout error"
102 echo "==================================================="
103
104 # the test code
105
106 ${TESTJAVA}${FS}bin${FS}javac -target 1.4 -source 1.4 \
107 -d . ${TESTSRC}${FS}SerialTest.java || exit 10
108
109 # You can set ALT_JAVA_RE_JDK to another location that contains the
110 # binaries for older JDK releases. You can set it to a non-existent
111 # directory to skip the interop tests between different versions.
112
113 if [ "$ALT_JAVA_RE_JDK" = "" ]; then
114 JAVA_RE_JDK=/java/re/j2se
115 else
116 JAVA_RE_JDK=$ALT_JAVA_RE_JDK
117 fi
118
119 OLDJAVA="
120 $JAVA_RE_JDK/1.6.0/latest/binaries/${PF}
121 $JAVA_RE_JDK/1.5.0/latest/binaries/${PF}
122 $JAVA_RE_JDK/1.4.2/latest/binaries/${PF}
123 "
124
125 SMALL="
126 0.0
|
22 #
23 # @test
24 # @bug 4811968 6908628
25 # @summary Serialization compatibility with old versions (and fix)
26 # @author Weijun Wang
27 #
28 # set a few environment variables so that the shell-script can run stand-alone
29 # in the source directory
30
31 if [ "${TESTSRC}" = "" ] ; then
32 TESTSRC="."
33 fi
34 if [ "${TESTCLASSES}" = "" ] ; then
35 TESTCLASSES="."
36 fi
37 if [ "${TESTJAVA}" = "" ] ; then
38 echo "TESTJAVA not set. Test cannot execute."
39 echo "FAILED!!!"
40 exit 1
41 fi
42 if [ "${COMPILEJAVA}" = "" ]; then
43 COMPILEJAVA="${TESTJAVA}"
44 fi
45
46 # set platform-dependent variables
47 PF=""
48
49 OS=`uname -s`
50 case "$OS" in
51 SunOS )
52 FS="/"
53 ARCH=`isainfo`
54 case "$ARCH" in
55 sparc* )
56 PF="solaris-sparc"
57 ;;
58 i[3-6]86 )
59 PF="solaris-i586"
60 ;;
61 amd64* )
62 PF="solaris-amd64"
63 ;;
64 * )
89
90 # 'uname -m' does not give us enough information -
91 # should rely on $PROCESSOR_IDENTIFIER (as is done in Defs-windows.gmk),
92 # but JTREG does not pass this env variable when executing a shell script.
93 #
94 # execute test program - rely on it to exit if platform unsupported
95
96 ;;
97 * )
98 echo "Unsupported System: ${OS}"
99 exit 0;
100 ;;
101 esac
102
103 echo "==================================================="
104 echo "Try to set ALT_JAVA_RE_JDK if you see timeout error"
105 echo "==================================================="
106
107 # the test code
108
109 ${COMPILEJAVA}${FS}bin${FS}javac -target 1.4 -source 1.4 \
110 -d . ${TESTSRC}${FS}SerialTest.java || exit 10
111
112 # You can set ALT_JAVA_RE_JDK to another location that contains the
113 # binaries for older JDK releases. You can set it to a non-existent
114 # directory to skip the interop tests between different versions.
115
116 if [ "$ALT_JAVA_RE_JDK" = "" ]; then
117 JAVA_RE_JDK=/java/re/j2se
118 else
119 JAVA_RE_JDK=$ALT_JAVA_RE_JDK
120 fi
121
122 OLDJAVA="
123 $JAVA_RE_JDK/1.6.0/latest/binaries/${PF}
124 $JAVA_RE_JDK/1.5.0/latest/binaries/${PF}
125 $JAVA_RE_JDK/1.4.2/latest/binaries/${PF}
126 "
127
128 SMALL="
129 0.0
|