test/com/sun/jdi/SuspendNoFlagTest.sh

Print this page




  58 
  59 # The beginning of the script proper
  60 
  61 TARGETCLASS="HelloWorld"
  62 if [ -z "${TESTJAVA}" ] ; then
  63    # TESTJAVA is not set, so the test is running stand-alone.
  64    # TESTJAVA holds the path to the root directory of the build of the JDK
  65    # to be tested.  That is, any java files run explicitly in this shell
  66    # should use TESTJAVA in the path to the java interpreter.
  67    # So, we'll set this to the JDK spec'd on the command line.  If none
  68    # is given on the command line, tell the user that and use a default.
  69    # THIS IS THE JDK BEING TESTED.
  70    if [ -n "$1" ] ; then
  71           TESTJAVA=$1
  72       else
  73           TESTJAVA=$JAVA_HOME
  74    fi
  75    TESTSRC=.
  76    TESTCLASSES=.
  77    #Deal with .class files:
  78    ${TESTJAVA}/bin/javac -d ${TESTCLASSES} \
  79             -classpath "${TESTCLASSES}" -g \
  80             ${TARGETCLASS}.java
  81 fi
  82 #
  83 echo "JDK under test is: $TESTJAVA"
  84 #
  85 CP="-classpath \"${TESTCLASSES}\""
  86 #
  87 DEBUGEEFLAGS=
  88 if [ -r $TESTCLASSES/@debuggeeVMOptions ] ; then
  89    DEBUGEEFLAGS=`cat $TESTCLASSES/@debuggeeVMOptions`
  90 elif [ -r $TESTCLASSES/../@debuggeeVMOptions ] ; then
  91    DEBUGEEFLAGS=`cat $TESTCLASSES/../@debuggeeVMOptions`
  92 fi
  93 DEBUGEEFLAGS="$DEBUGEEFLAGS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n"
  94 
  95 java=java
  96 echo ${TESTJAVA}/bin/$java ${DEBUGEEFLAGS} ${CP} ${TARGETCLASS}
  97 eval ${TESTJAVA}/bin/$java ${DEBUGEEFLAGS} ${CP} ${TARGETCLASS}
  98 status=$?
  99 echo "test status was: $status"
 100 if [ $status -eq "0" ] ;
 101    then pass "status = 0 and no timeout occured"
 102 
 103    else fail "unspecified test failure (timed out or hung)"
 104 fi


  58 
  59 # The beginning of the script proper
  60 
  61 TARGETCLASS="HelloWorld"
  62 if [ -z "${TESTJAVA}" ] ; then
  63    # TESTJAVA is not set, so the test is running stand-alone.
  64    # TESTJAVA holds the path to the root directory of the build of the JDK
  65    # to be tested.  That is, any java files run explicitly in this shell
  66    # should use TESTJAVA in the path to the java interpreter.
  67    # So, we'll set this to the JDK spec'd on the command line.  If none
  68    # is given on the command line, tell the user that and use a default.
  69    # THIS IS THE JDK BEING TESTED.
  70    if [ -n "$1" ] ; then
  71           TESTJAVA=$1
  72       else
  73           TESTJAVA=$JAVA_HOME
  74    fi
  75    TESTSRC=.
  76    TESTCLASSES=.
  77    #Deal with .class files:
  78    ${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} ${TESTJAVACOPTS} -d ${TESTCLASSES} \
  79             -classpath "${TESTCLASSES}" -g \
  80             ${TARGETCLASS}.java
  81 fi
  82 #
  83 echo "JDK under test is: $TESTJAVA"
  84 #
  85 CP="-classpath \"${TESTCLASSES}\""
  86 #
  87 DEBUGEEFLAGS=
  88 if [ -r $TESTCLASSES/@debuggeeVMOptions ] ; then
  89    DEBUGEEFLAGS=`cat $TESTCLASSES/@debuggeeVMOptions`
  90 elif [ -r $TESTCLASSES/../@debuggeeVMOptions ] ; then
  91    DEBUGEEFLAGS=`cat $TESTCLASSES/../@debuggeeVMOptions`
  92 fi
  93 DEBUGEEFLAGS="$DEBUGEEFLAGS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n"
  94 
  95 java=java
  96 echo ${TESTJAVA}/bin/$java ${TESTVMOPTS} ${TESTJAVAOPTS} ${DEBUGEEFLAGS} ${CP} ${TARGETCLASS}
  97 eval ${TESTJAVA}/bin/$java ${TESTVMOPTS} ${TESTJAVAOPTS} ${DEBUGEEFLAGS} ${CP} ${TARGETCLASS}
  98 status=$?
  99 echo "test status was: $status"
 100 if [ $status -eq "0" ] ;
 101    then pass "status = 0 and no timeout occured"
 102 
 103    else fail "unspecified test failure (timed out or hung)"
 104 fi