7132247: java/rmi/registry/readTest/readTest.sh failing with Cygwin
authoralanb
Thu, 16 Aug 2012 14:35:26 +0100
changeset 13573 083e6f329de6
parent 13572 901174938be4
child 13574 9d58db93e184
7132247: java/rmi/registry/readTest/readTest.sh failing with Cygwin Reviewed-by: alanb Contributed-by: Eric Wang <yiming.wang@oracle.com>
jdk/test/ProblemList.txt
jdk/test/java/rmi/registry/readTest/readTest.sh
--- a/jdk/test/ProblemList.txt	Thu Aug 16 11:42:47 2012 +0100
+++ b/jdk/test/ProblemList.txt	Thu Aug 16 14:35:26 2012 +0100
@@ -253,8 +253,6 @@
 # 7146541
 java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java	linux-all
 
-# 7132247
-java/rmi/registry/readTest/readTest.sh				windows-all
 ############################################################################
 
 # jdk_security
--- a/jdk/test/java/rmi/registry/readTest/readTest.sh	Thu Aug 16 11:42:47 2012 +0100
+++ b/jdk/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