20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 27 # @test 28 # @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757 29 # @summary Basic unit tests for the VM attach mechanism. 30 # 31 # @build BasicTests 32 # @run shell BasicTests.sh 33 34 if [ "${TESTSRC}" = "" ] 35 then 36 echo "TESTSRC not set. Test cannot execute. Failed." 37 exit 1 38 fi 39 40 . ${TESTSRC}/CommonSetup.sh 41 . ${TESTSRC}/ApplicationSetup.sh 42 . ${TESTSRC}/AgentSetup.sh 43 44 startApplication -Dattach.test=true 45 # pid = process-id, port = shutdown port 46 47 failures=0 48 49 echo "Running tests ..." 50 51 $JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \ 52 BasicTests $pid $agent $badagent $redefineagent 2>&1 53 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi 54 55 stopApplication $port 56 57 if [ $failures = 0 ]; 58 then echo "All tests passed."; 59 else echo "$failures test(s) failed:"; cat ${OUTPUTFILE}; | 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 27 # @test 28 # @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757 29 # @summary Basic unit tests for the VM attach mechanism. 30 # 31 # @build BasicTests 32 # @run shell BasicTests.sh 33 34 if [ "${TESTSRC}" = "" ] 35 then 36 echo "TESTSRC not set. Test cannot execute. Failed." 37 exit 1 38 fi 39 40 # Windows 2000 is a problem here, so we skip it, see 6962615 41 osrev=`uname -a` 42 if [ "`echo ${osrev} | grep 'CYGWIN'`" != "" ] ; then 43 if [ "`echo ${osrev} | grep '5.0'`" != "" ] ; then 44 echo "Treating as a pass, not testing Windows 2000" 45 exit 0 46 fi 47 fi 48 if [ "`echo ${osrev} | grep 'Windows'`" != "" ] ; then 49 if [ "`echo ${osrev} | grep '5 00'`" != "" ] ; then 50 echo "Treating as a pass, not testing Windows 2000" 51 exit 0 52 fi 53 fi 54 55 . ${TESTSRC}/CommonSetup.sh 56 . ${TESTSRC}/ApplicationSetup.sh 57 . ${TESTSRC}/AgentSetup.sh 58 59 startApplication -Dattach.test=true 60 # pid = process-id, port = shutdown port 61 62 failures=0 63 64 echo "Running tests ..." 65 66 $JAVA -classpath "${TESTCLASSES}${PS}${TESTJAVA}/lib/tools.jar" \ 67 BasicTests $pid $agent $badagent $redefineagent 2>&1 68 if [ $? != 0 ]; then failures=`expr $failures + 1`; fi 69 70 stopApplication $port 71 72 if [ $failures = 0 ]; 73 then echo "All tests passed."; 74 else echo "$failures test(s) failed:"; cat ${OUTPUTFILE}; |