author | serb |
Tue, 12 Nov 2013 20:24:25 +0400 | |
changeset 21596 | 0e3a39f29dbc |
parent 15254 | 3997a6f357cb |
permissions | -rw-r--r-- |
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
1 |
#!/bin/sh |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
2 |
# |
5506 | 3 |
# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
21596 | 4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
5 |
# |
21596 | 6 |
# This code is free software; you can redistribute it and/or modify it |
7 |
# under the terms of the GNU General Public License version 2 only, as |
|
8 |
# published by the Free Software Foundation. |
|
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
9 |
# |
21596 | 10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
# accompanied this code). |
|
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
15 |
# |
21596 | 16 |
# You should have received a copy of the GNU General Public License version |
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
19 |
# |
21596 | 20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
21 |
# or visit www.oracle.com if you need additional information or have any |
|
22 |
# questions. |
|
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
23 |
# |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
24 |
# |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
25 |
# |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
26 |
# This script builds the test files for the test |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
27 |
# but not the actual test sources themselves. |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
28 |
# |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
29 |
if [ "${TESTSRC}" = "" ] |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
30 |
then |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
31 |
echo "TESTSRC not set. Test cannot execute. Failed." |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
32 |
exit 1 |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
33 |
fi |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
34 |
echo "TESTSRC=${TESTSRC}" |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
35 |
|
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
36 |
if [ "${TESTJAVA}" = "" ] |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
37 |
then |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
38 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
39 |
exit 1 |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
40 |
fi |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
41 |
echo "TESTJAVA=${TESTJAVA}" |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
42 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
43 |
if [ "${COMPILEJAVA}" = "" ]; then |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
44 |
COMPILEJAVA="${TESTJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
45 |
fi |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
46 |
echo "COMPILEJAVA=${COMPILEJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
47 |
|
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
48 |
if [ "${TESTCLASSES}" = "" ] |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
49 |
then |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
50 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
51 |
exit 1 |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
52 |
fi |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
53 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
54 |
JAVAC="${COMPILEJAVA}/bin/javac" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
55 |
JAR="${COMPILEJAVA}/bin/jar" |
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
56 |
|
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
57 |
rm -rf ${TESTCLASSES}/test1 |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
58 |
rm -rf ${TESTCLASSES}/test2 |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
59 |
rm -rf ${TESTCLASSES}/serverRoot |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
60 |
mkdir -p ${TESTCLASSES}/test1/com/foo |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
61 |
mkdir -p ${TESTCLASSES}/test2/com/foo |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
62 |
mkdir -p ${TESTCLASSES}/serverRoot |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
63 |
|
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
64 |
cd ${TESTSRC}/test1/com/foo |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
65 |
cp * ${TESTCLASSES}/test1/com/foo |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
66 |
cd ${TESTCLASSES}/test1 |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
67 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} com/foo/*.java |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
68 |
${JAR} ${TESTTOOLVMOPTS} cvf ../test1.jar com/foo/*.class com/foo/Resource* |
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
69 |
|
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
70 |
cd ${TESTSRC}/test2/com/foo |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
71 |
cp * ${TESTCLASSES}/test2/com/foo |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
72 |
cd ${TESTCLASSES}/test2 |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
73 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} com/foo/*.java |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
74 |
${JAR} ${TESTTOOLVMOPTS} cvf ../test2.jar com/foo/*.class com/foo/Resource* |
1940
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
75 |
|
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
76 |
cp ${TESTSRC}/serverRoot/Test.java ${TESTCLASSES}/serverRoot |
e81514210873
4167874: URL-downloaded jar files can consume all available file descriptors
michaelm
parents:
diff
changeset
|
77 |
cd ${TESTCLASSES}/serverRoot |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
5506
diff
changeset
|
78 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} Test.java |