7132247: java/rmi/registry/readTest/readTest.sh failing with Cygwin

Reviewed-by: alanb
This commit is contained in:
Eric Wang 2012-08-16 14:35:26 +01:00 committed by Alan Bateman
parent 16c1be5ff6
commit 6b186c1238
2 changed files with 16 additions and 5 deletions

View File

@ -253,8 +253,6 @@ java/nio/channels/Selector/OutOfBand.java macosx-all
# 7146541
java/rmi/transport/rapidExportUnexport/RapidExportUnexport.java linux-all
# 7132247
java/rmi/registry/readTest/readTest.sh windows-all
############################################################################
# jdk_security

View File

@ -35,18 +35,23 @@ case "$OS" in
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 @@ RMIREG_PID=$!
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