test/java/lang/instrument/ManifestTest.sh
Print this page
@@ -310,11 +310,11 @@
if [ -n "$can_set_nmp_line" ]; then
echo "${can_set_nmp_line}" >> ${AGENT}.mf
fi
rm -f ${AGENT}.jar
- ${JAR} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}.class
+ ${JAR} ${TESTTOOLVMOPTS} cvfm ${AGENT}.jar ${AGENT}.mf ${AGENT}.class
echo "$expect_boot_cp_line" > expect_boot_cp_line
echo "$expect_redef_line" > expect_redef_line
echo "$expect_retrans_line" > expect_retrans_line
echo "$expect_set_nmp_line" > expect_set_nmp_line
@@ -324,10 +324,16 @@
then
echo "TESTJAVA not set. Test cannot execute. Failed."
exit 1
fi
+if [ "${COMPILEJAVA}" = "" ]
+then
+ COMPILEJAVA="${TESTJAVA}"
+fi
+echo "COMPILEJAVA=${COMPILEJAVA}"
+
if [ "${TESTSRC}" = "" ]
then
echo "TESTSRC not set. Test cannot execute. Failed."
exit 1
fi
@@ -336,12 +342,12 @@
then
echo "TESTCLASSES not set. Test cannot execute. Failed."
exit 1
fi
-JAR="${TESTJAVA}/bin/jar"
-JAVAC="${TESTJAVA}"/bin/javac
+JAR="${COMPILEJAVA}/bin/jar"
+JAVAC="${COMPILEJAVA}"/bin/javac
JAVA="${TESTJAVA}"/bin/java
# Now that ManifestTestApp.class is built, we move
# ExampleForBootClassPath.class so that it cannot be found
# by default
@@ -351,21 +357,21 @@
# create a bad version of ExampleForBootClassPath.class
# so we can tell when the wrong version is run
sed 's/return 15/return 42/' "${TESTSRC}"/ExampleForBootClassPath.java \
> ExampleForBootClassPath.java
-"$JAVAC" ExampleForBootClassPath.java
+"$JAVAC" ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ExampleForBootClassPath.java
mv ExampleForBootClassPath.class \
$OUT_OF_THE_WAY/ExampleForBootClassPath.class.bad
mv ExampleForBootClassPath.java \
$OUT_OF_THE_WAY/ExampleForBootClassPath.java.bad
AGENT=ManifestTestAgent
# We compile the agent in the working directory instead of with
# a build task because we construct a different agent JAR file
# for each test case.
-${JAVAC} -d . ${TESTSRC}/${AGENT}.java
+${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/${AGENT}.java
FAIL_MARKER=fail_marker
rm -f $FAIL_MARKER
while read token; do