author | dcubed |
Thu, 22 Dec 2011 18:35:48 -0800 | |
changeset 11359 | 9e53808b2128 |
child 15254 | 3997a6f357cb |
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 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
20 |
if [ "${TESTCLASSES}" = "" ] |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
21 |
then |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
22 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
23 |
exit 1 |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
24 |
fi |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
25 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
26 |
JAVAC="${TESTJAVA}/bin/javac -g" |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
27 |
JAR="${TESTJAVA}/bin/jar" |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
28 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
29 |
cp ${TESTSRC}/${AGENT}.java ${TESTSRC}/${OTHER}.java . |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
30 |
${JAVAC} ${AGENT}.java ${OTHER}.java |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
31 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
32 |
echo "Manifest-Version: 1.0" > ${AGENT}.mf |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
33 |
echo Premain-Class: ${AGENT} >> ${AGENT}.mf |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
34 |
while [ $# != 0 ] ; do |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
35 |
echo $1 >> ${AGENT}.mf |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
36 |
shift |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
37 |
done |
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
38 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
39 |
|
9e53808b2128
7121600: Instrumentation.redefineClasses() leaks class bytes
dcubed
parents:
diff
changeset
|
40 |
${JAR} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}*.class ${OTHER}*.java |