jdk/test/sun/management/jdp/JdpTest.sh
changeset 20509 9f5b0fa647cd
parent 17721 1d6516794d05
child 21295 5c73446feb1f
equal deleted inserted replaced
20508:0c41e68de505 20509:9f5b0fa647cd
    82   shift
    82   shift
    83 
    83 
    84   ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} ${testappname}  >> ${_logname} 2>&1 &
    84   ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} ${testappname}  >> ${_logname} 2>&1 &
    85  _last_pid=$!
    85  _last_pid=$!
    86 
    86 
    87   npid=`_get_pid`
    87 # wait until VM is actually starts. 
    88   if [ "${npid}" = "" ]
    88 # please note, if vm doesn't start for some reason
    89   then
    89 # jtreg kills the test by timeout. Don't file a bug.
    90      echo "ERROR: Test app not started. Please check machine resources before filing a bug."
    90   cnt=1 
    91      if [ "${_jtreg}" = "yes" ]
    91   while true
    92      then
    92   do
    93        exit 255
    93     npid=`_get_pid`
    94      fi
    94     if [ "${npid}" != "" ]
    95   fi
    95     then
       
    96       break
       
    97     fi
       
    98     if [ "${cnt}" = "10" ]
       
    99     then
       
   100       echo "ERROR: Test app not started. Please check machine resources before filing a bug."
       
   101       if [ "${_jtreg}" = "yes" ]
       
   102       then
       
   103           exit 255
       
   104       fi
       
   105       break
       
   106     fi
       
   107     cnt=`expr $cnt + 1`
       
   108     sleep 1
       
   109   done
    96 }
   110 }
    97 
   111 
    98 _get_pid(){
   112 _get_pid(){
    99     ${TESTJAVA}/bin/jps | sed -n "/Jdp/s/ .*//p"
   113     ${TESTJAVA}/bin/jps | sed -n "/Jdp/s/ .*//p"
   100 }
   114 }