jdk/test/com/sun/tools/attach/BasicTests.sh
changeset 9259 f63768ad58c5
parent 5813 8e455cd3e807
child 9275 1df1f7dfab7f
--- a/jdk/test/com/sun/tools/attach/BasicTests.sh	Tue Apr 12 14:32:03 2011 -0400
+++ b/jdk/test/com/sun/tools/attach/BasicTests.sh	Tue Apr 12 13:36:38 2011 -0700
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #
-# Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -39,11 +39,9 @@
 
 # Windows 2000 is a problem here, so we skip it, see 6962615
 osrev=`uname -a`
-if [ "`echo ${osrev} | grep 'CYGWIN'`" != "" ] ; then
-  if [ "`echo ${osrev} | grep '5.0'`" != "" ] ; then
-     echo "Treating as a pass, not testing Windows 2000"
-     exit 0
-  fi
+if [ "`echo ${osrev} | grep 'CYGWIN[^ ]*-5\.0'`" != "" ] ; then
+  echo "Treating as a pass, not testing Windows 2000"
+  exit 0
 fi
 if [ "`echo ${osrev} | grep 'Windows'`" != "" ] ; then
   if [ "`echo ${osrev} | grep '5 00'`" != "" ] ; then
@@ -58,7 +56,7 @@
 
 startApplication -Dattach.test=true
 # pid = process-id, port = shutdown port
-                                                                                                      
+
 failures=0
 
 echo "Running tests ..."
@@ -69,6 +67,18 @@
 
 stopApplication $port
 
+# Add these info messages to $OUTPUTFILE just in case someone
+# looks at it and wonders about the failures. We have to do
+# this after the application is stopped because it is writing
+# to $OUTPUTFILE.
+(
+echo ""
+echo "INFO: Test 2 will cause error messages about SilverBullet.jar" \
+    "and an agent failing to start."
+echo "INFO: Test 3 will cause error messages about BadAgent" \
+    "including a RuntimeException and an InvocationTargetException."
+) >> ${OUTPUTFILE}
+
 if [ $failures = 0 ]; 
   then echo "All tests passed.";
   else echo "$failures test(s) failed:"; cat ${OUTPUTFILE};