7030400: 3/4 PrivateTransportTest.sh needs adjustment to work with 7003964
authordcubed
Wed, 30 Mar 2011 21:10:02 -0700
changeset 9018 29184ade5361
parent 9017 765c8c24b7e4
child 9019 03920d69bb93
child 9826 0f553990ca93
7030400: 3/4 PrivateTransportTest.sh needs adjustment to work with 7003964 Summary: Fix typo in GetModuleHandle() function lookup. Reviewed-by: dholmes, alanb, acorn, zgu
jdk/test/com/sun/jdi/PrivateTransportTest.sh
--- a/jdk/test/com/sun/jdi/PrivateTransportTest.sh	Wed Mar 30 22:20:40 2011 -0400
+++ b/jdk/test/com/sun/jdi/PrivateTransportTest.sh	Wed Mar 30 21:10:02 2011 -0700
@@ -1,7 +1,7 @@
 #!/bin/ksh -p
 
 #
-# 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
@@ -99,6 +99,8 @@
 
 libdir=${TESTCLASSES}
 
+is_windows=false
+is_cygwin=false
 case `uname -s` in 
   SunOS)
     libarch=`uname -p`
@@ -126,10 +128,13 @@
     libloc=`dirname ${xx}`
     ;;
   Windows*)
+    is_windows=true
     libloc=${jreloc}/bin
     sep=';'
     ;;
   CYGWIN*)
+    is_windows=true
+    is_cygwin=true
     libloc=${jreloc}/bin
     sep=':'
 
@@ -176,7 +181,18 @@
 #
 CP="-classpath \"${TESTCLASSES}\""
 #
-DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${private_transport},server=y,suspend=n"
+if [ "$is_windows" = "true" ]; then
+    if [ "$is_cygwin" = "true" ]; then
+        win_fullpath=`cygpath -m "$fullpath" \
+            | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'`
+    else
+        win_fullpath=`echo "$fullpath" \
+            | sed -e 's#/#\\\\\\\\#g' -e 's/\.dll//'`
+    fi
+    DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${win_fullpath},server=y,suspend=n"
+else
+    DEBUGGEEFLAGS="$DEBUGGEEFLAGS -agentlib:jdwp=transport=${private_transport},server=y,suspend=n"
+fi
                
 echo ${TESTJAVA}/bin/java ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS}
 eval ${TESTJAVA}/bin/java ${DEBUGGEEFLAGS} ${CP} ${TARGETCLASS}