test/java/util/Currency/PropertiesTest.sh
Print this page
rev 7360 : imported patch 6863624
@@ -21,11 +21,11 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# @test
-# @bug 6332666 7180362 8003846
+# @bug 6332666 6863624 7180362 8003846
# @summary tests the capability of replacing the currency data with user
# specified currency properties file
# @build PropertiesTest
# @run shell/timeout=600 PropertiesTest.sh
@@ -54,14 +54,19 @@
case "$OS" in
SunOS | Linux | Darwin )
PS=":"
FS="/"
;;
- Windows* | CYGWIN* )
+ Windows* )
PS=";"
FS="/"
;;
+ CYGWIN* )
+ PS=";"
+ FS="/"
+ TESTJAVA=`cygpath -u ${TESTJAVA}`
+ ;;
* )
echo "Unrecognized system!"
exit 1;
;;
esac
@@ -90,28 +95,31 @@
# Dump built-in currency data + overrides in properties file copied into
# JRE image.
-# copy the test properties file
+# Copy the test properties file. If testjava is not a typical jdk-image
+# or testjava is not writable, make a private copy of it.
COPIED=0
-if [ -w $TESTJAVA ]
+if [ -w ${TESTJAVA}${FS}jre${FS}lib ]
then
WRITABLEJDK=$TESTJAVA
+ PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
else
WRITABLEJDK=.${FS}testjava
+ if [ -d ${TESTJAVA}${FS}jre ]
+ then
+ PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
+ else
+ PROPLOCATION=${WRITABLEJDK}${FS}lib
+ fi
cp -r $TESTJAVA $WRITABLEJDK
+ chmod -R +w $WRITABLEJDK
COPIED=1
fi
-
-if [ -d ${WRITABLEJDK}${FS}jre ]
-then
- PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
-else
- PROPLOCATION=${WRITABLEJDK}${FS}lib
-fi
cp ${PROPS} $PROPLOCATION
+echo "Properties location: ${PROPLOCATION}"
# run
echo ''
sh -xc "${WRITABLEJDK}${FS}bin${FS}java ${TESTVMOPTS} -cp ${TESTCLASSES} PropertiesTest -d dump3"
if [ $? != 0 ]; then failures=`expr $failures + 1`; fi