comparison test/java/util/ResourceBundle/modules/basic/basic.sh @ 13553:6a7e0309fa89

Update ResourceBundle tests specific target module to javac -XaddExports
author alanb
date Fri, 31 Jul 2015 08:10:32 +0100
parents 70d30ff90c0f
children 092748c0492c
comparison
equal deleted inserted replaced
6:ba9d205f0ed3 7:d4286d1f158f
39 JAR="$COMPILEJAVA/bin/jar" 39 JAR="$COMPILEJAVA/bin/jar"
40 JAVA="$TESTJAVA/bin/java" 40 JAVA="$TESTJAVA/bin/java"
41 41
42 # This test is temporarily converted to use AbstractResourceBundleProvider class 42 # This test is temporarily converted to use AbstractResourceBundleProvider class
43 # to avoid calling Control.newBundle 43 # to avoid calling Control.newBundle
44 44 EXTRA_OPTS="-XaddExports:java.base/sun.util.locale.provider=mainbundles"
45 EXTRA_JAVAC_OPTS="-XaddExports:java.base/sun.util.locale.provider"
46 EXTRA_JAVA_OPTS="-XaddExports:java.base/sun.util.locale.provider=mainbundles"
47 45
48 rm -rf mods 46 rm -rf mods
49 47
50 CP= 48 CP=
51 for I in main eu asia 49 for I in main eu asia
52 do 50 do
53 B=${I}bundles 51 B=${I}bundles
54 mkdir -p mods/$B 52 mkdir -p mods/$B
55 CLASSES="`find $TESTSRC/src/$B -name '*.java'`" 53 CLASSES="`find $TESTSRC/src/$B -name '*.java'`"
56 if [ "x$CLASSES" != x ]; then 54 if [ "x$CLASSES" != x ]; then
57 $JAVAC ${EXTRA_JAVAC_OPTS} -g -d mods -modulesourcepath $TESTSRC/src $CP $CLASSES 55 $JAVAC ${EXTRA_OPTS} -g -d mods -modulesourcepath $TESTSRC/src $CP $CLASSES
58 fi 56 fi
59 PROPS="`(cd $TESTSRC/src/$B; find . -name '*.properties')`" 57 PROPS="`(cd $TESTSRC/src/$B; find . -name '*.properties')`"
60 if [ "x$PROPS" != x ]; then 58 if [ "x$PROPS" != x ]; then
61 for P in $PROPS 59 for P in $PROPS
62 do 60 do
67 fi 65 fi
68 CP="-cp mods/mainbundles" 66 CP="-cp mods/mainbundles"
69 done 67 done
70 68
71 mkdir -p mods/test 69 mkdir -p mods/test
72 $JAVAC ${EXTRA_JAVAC_OPTS} -g -cp mods/mainbundles -d mods -modulesourcepath $TESTSRC/src \ 70 $JAVAC ${EXTRA_OPTS} -g -cp mods/mainbundles -d mods -modulesourcepath $TESTSRC/src \
73 `find $TESTSRC/src/test -name "*.java"` 71 `find $TESTSRC/src/test -name "*.java"`
74 72
75 # Create a jar to be added to the class path. Expected only properties files are 73 # Create a jar to be added to the class path. Expected only properties files are
76 # picked up from the class path. 74 # picked up from the class path.
77 rm -f extra.jar 75 rm -f extra.jar
79 $JAVAC -d classes $TESTSRC/src/extra/jdk/test/resources/eu/*.java 77 $JAVAC -d classes $TESTSRC/src/extra/jdk/test/resources/eu/*.java
80 $JAR -cf extra.jar -C classes jdk/test/resources/eu \ 78 $JAR -cf extra.jar -C classes jdk/test/resources/eu \
81 -C $TESTSRC/src/extra jdk/test/resources/asia 79 -C $TESTSRC/src/extra jdk/test/resources/asia
82 $JAR -tvf extra.jar 80 $JAR -tvf extra.jar
83 81
84 $JAVA ${EXTRA_JAVA_OPTS} -mp mods -m test/jdk.test.Main de fr ja zh-tw en de && 82 $JAVA ${EXTRA_OPTS} -mp mods -m test/jdk.test.Main de fr ja zh-tw en de &&
85 # properties files on the class path should be picked up. 83 # properties files on the class path should be picked up.
86 $JAVA ${EXTRA_JAVA_OPTS} -cp extra.jar -mp mods -m test/jdk.test.Main de fr ja zh-tw en de vi && 84 $JAVA ${EXTRA_OPTS} -cp extra.jar -mp mods -m test/jdk.test.Main de fr ja zh-tw en de vi &&
87 # classes on the class path shouldn't. 85 # classes on the class path shouldn't.
88 ! $JAVA ${EXTRA_JAVA_OPTS} -cp extra.jar -mp mods -m test/jdk.test.Main es 86 ! $JAVA ${EXTRA_OPTS} -cp extra.jar -mp mods -m test/jdk.test.Main es
89 87
90 exit $? 88 exit $?