mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-6951 Fixed secureCheck issues
X-SVN-Rev: 26131
This commit is contained in:
parent
793788bbe0
commit
34beeaddfc
3 changed files with 24 additions and 17 deletions
|
@ -87,6 +87,8 @@
|
|||
<target name="tests" depends="info, core-tests, charset-tests, localespi-tests" description="Build ICU4J API test classes"/>
|
||||
<target name="releaseJar" depends="info, jar, jarDocs, jarSrc" description="Build all jar files for distribution"/>
|
||||
|
||||
<target name="secure" depends="main, jar, tests" description="(Deprecated)Build ICU4J API and test classes for running the ICU4J test suite with Java security manager enabled"/>
|
||||
|
||||
<target name="check" description="Run the standard ICU4J test suite">
|
||||
<antcall target="_runCheck">
|
||||
<param name="runcheck.arg" value="-n"/>
|
||||
|
|
|
@ -6,26 +6,17 @@
|
|||
//#* This is the ant build file for ICU4J. See readme.html for more information.
|
||||
//#*
|
||||
// policies needed to run tests
|
||||
grant // codebase "file:${user.dir}/icu4jtests.jar"
|
||||
grant
|
||||
{
|
||||
// temporary for debugging
|
||||
// permission java.lang.RuntimePermission "getProtectionDomain";
|
||||
|
||||
// ibm 141 on ibm xp can't use reflection
|
||||
permission java.lang.RuntimePermission "accessDeclaredMembers";
|
||||
|
||||
// needed for Locale.setDefault, only used in tests and demos
|
||||
permission java.util.PropertyPermission "user.language", "write";
|
||||
|
||||
// needed for TestUtils
|
||||
permission java.util.PropertyPermission "ICUDataPath", "read";
|
||||
permission java.util.PropertyPermission "user.dir", "read";
|
||||
permission java.util.PropertyPermission "GENERATE_TEST_DATA", "read";
|
||||
|
||||
// time zone tests
|
||||
permission java.util.PropertyPermission "user.timezone", "read";
|
||||
|
||||
//for charsets
|
||||
// for charsets
|
||||
permission java.lang.RuntimePermission "charsetProvider", "read";
|
||||
|
||||
// IBM 1.6 on Windows does not allow to use reflection to access
|
||||
|
@ -40,11 +31,18 @@ grant // codebase "file:${user.dir}/icu4jtests.jar"
|
|||
// loader doesn't disambiguate which protection domain we're using. it's
|
||||
// not easy to figure out the security docs, sigh.
|
||||
//
|
||||
// this is so ICUData (in icu4j.jar), called from test code (in icu4jtests.jar)
|
||||
// can read test resource files (in icu4jtests.jar"
|
||||
// this is so ICUData (in icu4j.jar), called from test code (in core/charset tests jar)
|
||||
// can read test resource files (in core/charset tests jar)
|
||||
//
|
||||
grant codebase "file:${user.dir}/icu4j.jar"
|
||||
grant codebase "file:${user.dir}/main/classes/core/out/lib/icu4j.jar"
|
||||
{
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}icu4jtests.jar", "read";
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}icu4j-charsets.jar", "read";
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}main${/}tests${/}core${/}out${/}lib${/}icu4j-core-tests.jar", "read";
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}main${/}tests${/}charset${/}out${/}lib${/}icu4j-charset-tests.jar", "read";
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}main${/}classes${/}charset${/}out${/}lib${/}icu4j-charsets.jar", "read";
|
||||
};
|
||||
|
||||
grant codebase "file:${user.dir}/main/tests/framework/out/lib/icu4j-test-framework.jar"
|
||||
{
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}main${/}tests${/}core${/}out${/}lib${/}icu4j-core-tests.jar", "read";
|
||||
permission java.io.FilePermission "${/}${user.dir}${/}main${/}tests${/}charset${/}out${/}lib${/}icu4j-charset-tests.jar", "read";
|
||||
};
|
|
@ -29,7 +29,14 @@ import com.ibm.icu.util.TimeZone;
|
|||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class DateTimeGeneratorTest extends TestFmwk {
|
||||
public static boolean GENERATE_TEST_DATA = System.getProperty("GENERATE_TEST_DATA") != null;
|
||||
public static boolean GENERATE_TEST_DATA;
|
||||
static {
|
||||
try {
|
||||
GENERATE_TEST_DATA = System.getProperty("GENERATE_TEST_DATA") != null;
|
||||
} catch (SecurityException e) {
|
||||
GENERATE_TEST_DATA = false;
|
||||
}
|
||||
};
|
||||
public static int RANDOM_COUNT = 1000;
|
||||
public static boolean DEBUG = false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue