author | michaelm |
Tue, 06 Mar 2012 20:27:12 +0000 | |
changeset 12084 | b367473ef0f1 |
parent 9087 | e9e44877cd18 |
permissions | -rw-r--r-- |
10 | 1 |
#!/bin/sh |
2 |
||
3 |
# |
|
9087
e9e44877cd18
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
8222
diff
changeset
|
4 |
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
# |
|
5520 | 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. |
|
10 | 24 |
# |
25 |
||
26 |
||
27 |
# @test |
|
28 |
# @bug 4204897 4256097 4785453 4863609 |
|
29 |
# @summary Test that '.jar' files in -extdirs are found. |
|
30 |
# @author maddox |
|
31 |
# |
|
32 |
# @run shell/timeout=180 ExtDirs.sh |
|
33 |
||
34 |
if [ "${TESTSRC}" = "" ] |
|
35 |
then |
|
36 |
echo "TESTSRC not set. Test cannot execute. Failed." |
|
37 |
exit 1 |
|
38 |
fi |
|
39 |
echo "TESTSRC=${TESTSRC}" |
|
40 |
if [ "${TESTJAVA}" = "" ] |
|
41 |
then |
|
42 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
|
43 |
exit 1 |
|
44 |
fi |
|
45 |
echo "TESTJAVA=${TESTJAVA}" |
|
46 |
if [ "${TESTCLASSES}" = "" ] |
|
47 |
then |
|
48 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
|
49 |
exit 1 |
|
50 |
fi |
|
51 |
echo "TESTCLASSES=${TESTCLASSES}" |
|
52 |
echo "CLASSPATH=${CLASSPATH}" |
|
53 |
||
54 |
# set platform-dependent variables |
|
55 |
OS=`uname -s` |
|
56 |
case "$OS" in |
|
12084
b367473ef0f1
7113349: Initial changeset for Macosx port to jdk
michaelm
parents:
9087
diff
changeset
|
57 |
SunOS | Linux | Darwin ) |
10 | 58 |
PS=":" |
59 |
FS="/" |
|
60 |
;; |
|
3772 | 61 |
CYGWIN* ) |
62 |
PS=";" # native PS, not Cygwin PS |
|
63 |
FS="/" |
|
64 |
;; |
|
10 | 65 |
Windows* ) |
66 |
PS=";" |
|
67 |
FS="\\" |
|
68 |
;; |
|
69 |
* ) |
|
70 |
echo "Unrecognized system!" |
|
71 |
exit 1; |
|
72 |
;; |
|
73 |
esac |
|
74 |
||
75 |
fail() { |
|
76 |
echo 'FAIL: unexpected result encountered' |
|
77 |
exit 1 |
|
78 |
} |
|
79 |
||
80 |
javac="${TESTJAVA}${FS}bin${FS}javac" |
|
81 |
||
82 |
for i in 1 2 3; do |
|
83 |
if test ! -d ext${i}; then mkdir ext${i}; fi |
|
84 |
cp ${TESTSRC}${FS}ext${i}${FS}*.jar ext${i} |
|
85 |
done |
|
86 |
||
87 |
echo "Test 1" |
|
8222
28db72eee100
6581775: Fix the white space problem in javac shell tests
jjg
parents:
5520
diff
changeset
|
88 |
"$javac" ${TESTTOOLVMOPTS} -d . -extdirs ext1 "${TESTSRC}${FS}ExtDirTest_1.java" |
10 | 89 |
if [ $? -ne 0 ] ; then fail ; fi |
90 |
||
91 |
echo "Test 2" |
|
8222
28db72eee100
6581775: Fix the white space problem in javac shell tests
jjg
parents:
5520
diff
changeset
|
92 |
"$javac" ${TESTTOOLVMOPTS} -d . -extdirs ext1${PS}ext2 "${TESTSRC}${FS}ExtDirTest_2.java" |
10 | 93 |
if [ $? -ne 0 ] ; then fail ; fi |
94 |
||
95 |
echo "Test 3" |
|
8222
28db72eee100
6581775: Fix the white space problem in javac shell tests
jjg
parents:
5520
diff
changeset
|
96 |
"$javac" ${TESTTOOLVMOPTS} -d . -extdirs ext3 "${TESTSRC}${FS}ExtDirTest_3.java" |
10 | 97 |
if [ $? -ne 0 ] ; then fail ; fi |
98 |
||
99 |
echo PASS: all tests gave expected results |
|
100 |
exit 0 |