85 # and set all appropriate variables: 86 87 if [ -z "${TESTJAVA}" ] ; then 88 # TESTJAVA is not set, so the test is running stand-alone. 89 # TESTJAVA holds the path to the root directory of the build of the JDK 90 # to be tested. That is, any java files run explicitly in this shell 91 # should use TESTJAVA in the path to the java interpreter. 92 # So, we'll set this to the JDK spec'd on the command line. If none 93 # is given on the command line, tell the user that and use a default. 94 # THIS IS THE JDK BEING TESTED. 95 if [ -n "$1" ] ; then 96 TESTJAVA=$1 97 else 98 TESTJAVA=$JAVA_HOME 99 fi 100 TESTSRC=. 101 TESTCLASSES=. 102 #Deal with .class files: 103 #if running standalone (no test harness of any kind), compile the 104 #support files and the test case 105 ${TESTJAVA}/bin/javac -d ${TESTCLASSES} \ 106 -classpath "$TESTJAVA/lib/tools.jar${PATHSEP}${TESTSRC}" \ 107 TestScaffold.java VMConnection.java TargetListener.java TargetAdapter.java 108 ${TESTJAVA}/bin/javac -d ${TESTCLASSES} \ 109 -classpath "$TESTJAVA/lib/tools.jar${PATHSEP}${TESTSRC}" -g \ 110 JITDebug.java 111 fi 112 echo "JDK under test is: $TESTJAVA" 113 # 114 CLASSPATH="$TESTJAVA/lib/tools.jar${PATHSEP}${TESTCLASSES}" 115 export CLASSPATH 116 CP="-classpath \"${CLASSPATH}\"" 117 # 118 TARGETCLASS=JITDebug 119 RUNFLAGS='-showversion -DTRANSPORT_METHOD="${TRANSPORT_METHOD}"' 120 RUNFLAGS="-Dtest.classes=${TESTCLASSES} ${RUNFLAGS}" 121 # 122 echo "" 123 echo "Environment variable definitions are:" 124 echo "" 125 env | sort 126 echo "" 127 echo "" 128 # 129 echo "Starting test:" 130 echo ${TESTJAVA}/bin/java -DHANGINGJAVA_DEB ${RUNFLAGS} ${CP} ${TARGETCLASS} 131 eval ${TESTJAVA}/bin/java -DHANGINGJAVA_DEB ${RUNFLAGS} ${CP} ${TARGETCLASS} 132 status=$? 133 if [ $status -ne "0" ]; 134 then fail "test failed for class=$TARGETCLASS!" 135 fi 136 # 137 # pass or fail the test based on status of the command 138 if [ $status -eq "0" ]; 139 then pass "" 140 141 else fail "unspecified test failure" 142 fi | 85 # and set all appropriate variables: 86 87 if [ -z "${TESTJAVA}" ] ; then 88 # TESTJAVA is not set, so the test is running stand-alone. 89 # TESTJAVA holds the path to the root directory of the build of the JDK 90 # to be tested. That is, any java files run explicitly in this shell 91 # should use TESTJAVA in the path to the java interpreter. 92 # So, we'll set this to the JDK spec'd on the command line. If none 93 # is given on the command line, tell the user that and use a default. 94 # THIS IS THE JDK BEING TESTED. 95 if [ -n "$1" ] ; then 96 TESTJAVA=$1 97 else 98 TESTJAVA=$JAVA_HOME 99 fi 100 TESTSRC=. 101 TESTCLASSES=. 102 #Deal with .class files: 103 #if running standalone (no test harness of any kind), compile the 104 #support files and the test case 105 ${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS} -d ${TESTCLASSES} \ 106 -classpath "$TESTJAVA/lib/tools.jar${PATHSEP}${TESTSRC}" \ 107 TestScaffold.java VMConnection.java TargetListener.java TargetAdapter.java 108 ${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS} -d ${TESTCLASSES} \ 109 -classpath "$TESTJAVA/lib/tools.jar${PATHSEP}${TESTSRC}" -g \ 110 JITDebug.java 111 fi 112 echo "JDK under test is: $TESTJAVA" 113 # 114 CLASSPATH="$TESTJAVA/lib/tools.jar${PATHSEP}${TESTCLASSES}" 115 export CLASSPATH 116 CP="-classpath \"${CLASSPATH}\"" 117 # 118 TARGETCLASS=JITDebug 119 RUNFLAGS='-showversion -DTRANSPORT_METHOD="${TRANSPORT_METHOD}"' 120 RUNFLAGS="-Dtest.classes=${TESTCLASSES} ${RUNFLAGS}" 121 # 122 echo "" 123 echo "Environment variable definitions are:" 124 echo "" 125 env | sort 126 echo "" 127 echo "" 128 # 129 echo "Starting test:" 130 echo ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} -DHANGINGJAVA_DEB ${RUNFLAGS} ${CP} ${TARGETCLASS} 131 eval ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} -DHANGINGJAVA_DEB ${RUNFLAGS} ${CP} ${TARGETCLASS} 132 status=$? 133 if [ $status -ne "0" ]; 134 then fail "test failed for class=$TARGETCLASS!" 135 fi 136 # 137 # pass or fail the test based on status of the command 138 if [ $status -eq "0" ]; 139 then pass "" 140 141 else fail "unspecified test failure" 142 fi |