author | simonis |
Fri, 17 Jan 2014 21:54:30 +0100 | |
changeset 22602 | 0d9a07b0d7e9 |
parent 15254 | 3997a6f357cb |
permissions | -rw-r--r-- |
2 | 1 |
#! /bin/sh |
2 |
||
3 |
# |
|
14342
8435a30053c1
7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents:
12047
diff
changeset
|
4 |
# Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 5 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 |
# |
|
7 |
# This code is free software; you can redistribute it and/or modify it |
|
8 |
# under the terms of the GNU General Public License version 2 only, as |
|
9 |
# published by the Free Software Foundation. |
|
10 |
# |
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# @test |
|
27 |
# @author Ram Marti |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
28 |
# @bug 4350951 |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
29 |
# @summary 4350951 assumes permission constructor with 2 string params |
2 | 30 |
|
31 |
# set a few environment variables so that the shell-script can run stand-alone |
|
32 |
# in the source directory |
|
33 |
if [ "${TESTSRC}" = "" ] ; then |
|
34 |
TESTSRC="." |
|
35 |
fi |
|
36 |
||
37 |
if [ "${TESTCLASSES}" = "" ] ; then |
|
38 |
TESTCLASSES="." |
|
39 |
fi |
|
40 |
||
41 |
if [ "${TESTJAVA}" = "" ] ; then |
|
42 |
echo "TESTJAVA not set. Test cannot execute." |
|
43 |
echo "FAILED!!!" |
|
44 |
exit 1 |
|
45 |
fi |
|
46 |
||
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
47 |
if [ "${COMPILEJAVA}" = "" ]; then |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
48 |
COMPILEJAVA="${TESTJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
49 |
fi |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
50 |
|
2 | 51 |
# set platform-dependent variables |
52 |
OS=`uname -s` |
|
53 |
case "$OS" in |
|
54 |
SunOS ) |
|
55 |
PS=":" |
|
56 |
FS="/" |
|
57 |
;; |
|
58 |
Linux ) |
|
59 |
PS=":" |
|
60 |
FS="/" |
|
61 |
;; |
|
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
62 |
Darwin ) |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
63 |
PS=":" |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
64 |
FS="/" |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
65 |
;; |
22602
0d9a07b0d7e9
8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents:
15254
diff
changeset
|
66 |
AIX ) |
0d9a07b0d7e9
8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents:
15254
diff
changeset
|
67 |
PS=":" |
0d9a07b0d7e9
8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents:
15254
diff
changeset
|
68 |
FS="/" |
0d9a07b0d7e9
8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents:
15254
diff
changeset
|
69 |
;; |
3433 | 70 |
CYGWIN* ) |
71 |
PS=";" |
|
72 |
FS="/" |
|
73 |
;; |
|
2 | 74 |
Windows* ) |
75 |
PS=";" |
|
76 |
FS="\\" |
|
77 |
;; |
|
78 |
* ) |
|
79 |
echo "Unrecognized system!" |
|
80 |
exit 1; |
|
81 |
;; |
|
82 |
esac |
|
83 |
||
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
84 |
if [ ! -d ${TESTCLASSES}${FS}boot ]; then |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
85 |
mkdir -p ${TESTCLASSES}${FS}boot |
2 | 86 |
fi |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
87 |
if [ ! -d ${TESTCLASSES}${FS}app ]; then |
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
88 |
mkdir -p ${TESTCLASSES}${FS}app |
2 | 89 |
fi |
90 |
||
91 |
cd ${TESTSRC}${FS} |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
92 |
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}boot \ |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
93 |
${TESTSRC}${FS}NoArgPermission.java |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
94 |
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}boot \ |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
95 |
${TESTSRC}${FS}OneArgPermission.java |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
96 |
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}boot \ |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
97 |
${TESTSRC}${FS}TwoArgPermission.java |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
98 |
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}boot \ |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
99 |
${TESTSRC}${FS}TwoArgNullActionsPermission.java |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
100 |
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}app \ |
12047
320a714614e9
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
5506
diff
changeset
|
101 |
${TESTSRC}${FS}GetInstance.java |
2 | 102 |
|
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14342
diff
changeset
|
103 |
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \ |
2 | 104 |
-Xbootclasspath/a:"${TESTCLASSES}${FS}boot" \ |
105 |
-classpath "${TESTCLASSES}${FS}app" -Djava.security.manager \ |
|
106 |
-Djava.security.policy=GetInstance.policy \ |
|
107 |
GetInstance |
|
108 |
||
109 |
# Save error status |
|
110 |
status1=$? |
|
111 |
||
112 |
# print error message |
|
113 |
if [ $status1 -ne 0 ]; then |
|
114 |
echo "Failed on first test" |
|
115 |
fi |
|
116 |
||
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14342
diff
changeset
|
117 |
${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \ |
2 | 118 |
-classpath "${TESTCLASSES}${FS}boot${PS}${TESTCLASSES}${FS}app" \ |
119 |
-Djava.security.manager \ |
|
120 |
-Djava.security.policy=GetInstance.policy \ |
|
121 |
GetInstance |
|
122 |
||
123 |
# Save error status |
|
124 |
status2=$? |
|
125 |
||
126 |
# print error message |
|
127 |
if [ $status2 -ne 0 ]; then |
|
128 |
echo "Failed on second test" |
|
129 |
fi |
|
130 |
||
131 |
# |
|
132 |
# Exit ok? |
|
133 |
# |
|
134 |
if [ $status1 -ne 0 ]; then |
|
135 |
exit $status1 |
|
136 |
fi |
|
137 |
||
138 |
if [ $status2 -ne 0 ]; then |
|
139 |
exit $status2 |
|
140 |
fi |