changeset 4064:e2862ac26354

7030400: 3/4 PrivateTransportTest.sh needs adjustment to work with 7003964 Summary: Fix typo in GetModuleHandle() function lookup. Reviewed-by: dholmes, alanb, acorn, zgu
author dcubed
date Wed, 30 Mar 2011 21:10:02 -0700
parents 5107fb3a9c06
children 683957148bab aca0dc2b921c
files test/com/sun/jdi/PrivateTransportTest.sh
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/com/sun/jdi/PrivateTransportTest.sh	Wed Mar 30 22:20:40 2011 -0400
+++ b/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}