changeset 18539:cc30fa6fcf7c

6863624: java/util/Currency/PropertiesTest.sh writable check is incorrect Reviewed-by: alanb
author naoto
date Fri, 21 Jun 2013 13:42:55 -0700
parents 642cc17315fd
children 1f637992378a
files jdk/test/java/util/Currency/PropertiesTest.sh jdk/test/java/util/Locale/LocaleProviders.java jdk/test/java/util/Locale/LocaleProviders.sh
diffstat 3 files changed, 21 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/util/Currency/PropertiesTest.sh	Fri Jun 21 11:50:45 2013 -0700
+++ b/jdk/test/java/util/Currency/PropertiesTest.sh	Fri Jun 21 13:42:55 2013 -0700
@@ -23,7 +23,7 @@
 #
 
 # @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
@@ -56,10 +56,15 @@
     PS=":"
     FS="/"
     ;;
-  Windows* | CYGWIN* )
+  Windows* )
     PS=";"
     FS="/"
     ;;
+  CYGWIN* )
+    PS=";"
+    FS="/"
+    TESTJAVA=`cygpath -u ${TESTJAVA}`
+    ;;
   * )
     echo "Unrecognized system!"
     exit 1;
@@ -92,24 +97,27 @@
 # 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 ''
--- a/jdk/test/java/util/Locale/LocaleProviders.java	Fri Jun 21 11:50:45 2013 -0700
+++ b/jdk/test/java/util/Locale/LocaleProviders.java	Fri Jun 21 13:42:55 2013 -0700
@@ -207,7 +207,7 @@
             String jreResult = "\u5e73\u6210 16.11.03 (\u6c34) \u5348\u524d 11:53:47";
             Locale l = new Locale("ja", "JP", "JP");
             SimpleDateFormat sdf = new SimpleDateFormat("GGGG yyyy.MMM.dd '('E')' a hh:mm:ss", l);
-            sdf.setTimeZone(TimeZone.getTimeZone("PST"));
+            sdf.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
             String result = sdf.format(sampleDate);
             System.out.println(result);
             if (LocaleProviderAdapter.getAdapterPreference()
--- a/jdk/test/java/util/Locale/LocaleProviders.sh	Fri Jun 21 11:50:45 2013 -0700
+++ b/jdk/test/java/util/Locale/LocaleProviders.sh	Fri Jun 21 13:42:55 2013 -0700
@@ -24,7 +24,7 @@
 #
 # @test
 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
-#      8013086 8013233 8013903
+#      8013086 8013233 8013903 8015960
 # @summary tests for "java.locale.providers" system property
 # @compile -XDignore.symbol.file LocaleProviders.java
 # @run shell/timeout=600 LocaleProviders.sh