author | alanb |
Fri, 11 Jan 2013 20:19:55 +0000 | |
changeset 15254 | 3997a6f357cb |
parent 11359 | 9e53808b2128 |
child 18151 | bd65ac25937c |
permissions | -rw-r--r-- |
11359
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
1 |
#!/bin/sh |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
2 |
AGENT="$1" |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
3 |
OTHER="$2" |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
4 |
shift 2 |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
5 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
6 |
if [ "${TESTSRC}" = "" ] |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
7 |
then |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
8 |
echo "TESTSRC not set. Test cannot execute. Failed." |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
9 |
exit 1 |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
10 |
fi |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
11 |
echo "TESTSRC=${TESTSRC}" |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
12 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
13 |
if [ "${TESTJAVA}" = "" ] |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
14 |
then |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
15 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
16 |
exit 1 |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
17 |
fi |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
18 |
echo "TESTJAVA=${TESTJAVA}" |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
19 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
20 |
if [ "${COMPILEJAVA}" = "" ] |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
21 |
then |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
22 |
COMPILEJAVA="${TESTJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
23 |
fi |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
24 |
echo "COMPILEJAVA=${COMPILEJAVA}" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
25 |
|
11359
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
26 |
if [ "${TESTCLASSES}" = "" ] |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
27 |
then |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
28 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
29 |
exit 1 |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
30 |
fi |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
31 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
32 |
JAVAC="${COMPILEJAVA}/bin/javac -g" |
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
33 |
JAR="${COMPILEJAVA}/bin/jar" |
11359
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
34 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
35 |
cp ${TESTSRC}/${AGENT}.java ${TESTSRC}/${OTHER}.java . |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
36 |
${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${AGENT}.java ${OTHER}.java |
11359
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
37 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
38 |
echo "Manifest-Version: 1.0" > ${AGENT}.mf |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
39 |
echo Premain-Class: ${AGENT} >> ${AGENT}.mf |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
40 |
while [ $# != 0 ] ; do |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
41 |
echo $1 >> ${AGENT}.mf |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
42 |
shift |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
43 |
done |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
44 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
45 |
|
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
11359
diff
changeset
|
46 |
${JAR} "{TESTTOOLVMOPTS}" cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}*.class ${OTHER}*.java |