diff --git a/jdk/test/TEST.ROOT b/jdk/test/TEST.ROOT index e6cb16998ed..7288a0921d8 100644 --- a/jdk/test/TEST.ROOT +++ b/jdk/test/TEST.ROOT @@ -8,7 +8,7 @@ keys=2d dnd i18n othervm.dirs=java/awt java/beans javax/accessibility javax/imageio javax/sound javax/print javax/management com/sun/awt sun/awt sun/java2d sun/pisces # Tests that cannot run concurrently -exclusiveAccess.dirs=java/rmi/Naming java/util/Currency java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi +exclusiveAccess.dirs=java/rmi/Naming java/util/prefs sun/management/jmxremote sun/tools/jstatd sun/security/mscapi # Group definitions groups=TEST.groups [closed/TEST.groups] diff --git a/jdk/test/java/util/Currency/PropertiesTest.sh b/jdk/test/java/util/Currency/PropertiesTest.sh index 01f1326cd2d..cae14e6013c 100644 --- a/jdk/test/java/util/Currency/PropertiesTest.sh +++ b/jdk/test/java/util/Currency/PropertiesTest.sh @@ -97,25 +97,16 @@ run PropertiesTest -c dump1 dump2 ${PROPS} # Dump built-in currency data + overrides in properties file copied into # JRE image. -# 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}${FS}jre${FS}lib ] -then - WRITABLEJDK=$TESTJAVA +# Make a private copy of the jdk so we can write to the properties file location +# without disturbing other users, including concurrently executing tests. +WRITABLEJDK=.${FS}testjava +cp -Hr $TESTJAVA $WRITABLEJDK +if [ -d ${TESTJAVA}${FS}jre ]; then 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 + PROPLOCATION=${WRITABLEJDK}${FS}lib fi +chmod -R +w $WRITABLEJDK cp ${PROPS} $PROPLOCATION echo "Properties location: ${PROPLOCATION}" @@ -125,11 +116,7 @@ sh -xc "${WRITABLEJDK}${FS}bin${FS}java ${TESTVMOPTS} -cp ${TESTCLASSES} Propert if [ $? != 0 ]; then failures=`expr $failures + 1`; fi # Cleanup -rm -f ${PROPLOCATION}${FS}currency.properties -if [ $COPIED -eq 1 ] -then - rm -rf $WRITABLEJDK -fi +rm -rf $WRITABLEJDK # compare the two dump files run PropertiesTest -c dump1 dump3 ${PROPS}