test/com/sun/jdi/ImmutableResourceTest.sh

Print this page




  83    if [ -n "$1" ] ; then
  84           TESTJAVA=$1
  85       else
  86           TESTJAVA=$JAVA_HOME
  87    fi
  88    TESTSRC=.
  89    TESTCLASSES=.
  90    #Deal with .class files:
  91 fi
  92 #
  93 echo "JDK under test is: $TESTJAVA"
  94 #
  95 CP="-classpath ${TESTCLASSES}${PATHSEP}${TESTJAVA}/lib/tools.jar"
  96 # Compile the test class using the classpath we need:
  97 #
  98 env
  99 #
 100 set -vx
 101 #
 102 #Compile.  tools.jar is required on the classpath.
 103 ${TESTJAVA}/bin/javac -d "${TESTCLASSES}" ${CP} -g \
 104                          "${TESTSRC}"/"${TARGETCLASS}".java
 105 #
 106 #Run the test class, again with the classpath we need:
 107 ${TESTJAVA}/bin/java ${CP} ${TARGETCLASS}
 108 status=$?
 109 echo "test status was: $status"
 110 if [ $status -eq "0" ];
 111    then pass ""
 112 
 113    else fail "unspecified test failure"
 114 fi


  83    if [ -n "$1" ] ; then
  84           TESTJAVA=$1
  85       else
  86           TESTJAVA=$JAVA_HOME
  87    fi
  88    TESTSRC=.
  89    TESTCLASSES=.
  90    #Deal with .class files:
  91 fi
  92 #
  93 echo "JDK under test is: $TESTJAVA"
  94 #
  95 CP="-classpath ${TESTCLASSES}${PATHSEP}${TESTJAVA}/lib/tools.jar"
  96 # Compile the test class using the classpath we need:
  97 #
  98 env
  99 #
 100 set -vx
 101 #
 102 #Compile.  tools.jar is required on the classpath.
 103 ${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS} -d "${TESTCLASSES}" ${CP} -g \
 104                          "${TESTSRC}"/"${TARGETCLASS}".java
 105 #
 106 #Run the test class, again with the classpath we need:
 107 ${TESTJAVA}/bin/java ${TESTVMOPTS} ${TESTJAVAOPTS} ${CP} ${TARGETCLASS}
 108 status=$?
 109 echo "test status was: $status"
 110 if [ $status -eq "0" ];
 111    then pass ""
 112 
 113    else fail "unspecified test failure"
 114 fi