changeset 5309:245855b5c343

7132247: java/rmi/registry/readTest/readTest.sh failing with Cygwin Reviewed-by: alanb, dmocek, smarks Contributed-by: Eric Wang <yiming.wang@oracle.com>
author alanb
date Thu, 16 Aug 2012 14:35:26 +0100
parents 219367401fe5
children 3879f46e4c72
files test/java/rmi/registry/readTest/readTest.sh
diffstat 1 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/rmi/registry/readTest/readTest.sh	Mon Aug 27 11:44:45 2012 -0700
+++ b/test/java/rmi/registry/readTest/readTest.sh	Thu Aug 16 14:35:26 2012 +0100
@@ -35,18 +35,23 @@
     FS="/"
     FILEURL="file:"
     ;;
-  Windows* | CYGWIN* )
+  Windows* )
     PS=";"
     FS="\\"
     FILEURL="file:/"
     ;;
+  CYGWIN* )
+    PS=";"
+    FS="/"
+    FILEURL="file:/"
+    ;;
   * )
     echo "Unrecognized system!"
     exit 1;
     ;;
 esac
 
-TEST_CLASSPATH=.:$TESTCLASSES
+TEST_CLASSPATH=.$PS$TESTCLASSES
 cp -r ${TESTSRC}${FS}* .
 ${TESTJAVA}${FS}bin${FS}javac testPkg${FS}*java
 ${TESTJAVA}${FS}bin${FS}javac -cp $TEST_CLASSPATH readTest.java
@@ -62,8 +67,16 @@
 sleep 3
 cd ..
 
+case "$OS" in
+  CYGWIN* )
+    CODEBASE=`cygpath -w $PWD`
+    ;;
+  * )
+    CODEBASE=`pwd`
+    ;;  
+esac
 # trailing / after code base is important for rmi codebase property.
-${TESTJAVA}${FS}bin${FS}java -cp $TEST_CLASSPATH -Djava.rmi.server.codebase=${FILEURL}`pwd`/ readTest > OUT.TXT 2>&1 &
+${TESTJAVA}${FS}bin${FS}java -cp $TEST_CLASSPATH -Djava.rmi.server.codebase=${FILEURL}$CODEBASE/ readTest > OUT.TXT 2>&1 &
 TEST_PID=$!
 #bulk of testcase - let it run for a while
 sleep 5