7132270: tools/launcher/DefaultLocaleTestRun.java failing (win)
Reviewed-by: alanb, chegar
diff --git a/test/tools/launcher/TestHelper.java b/test/tools/launcher/TestHelper.java
index c0f1119..de8f3f7 100644
--- a/test/tools/launcher/TestHelper.java
+++ b/test/tools/launcher/TestHelper.java
@@ -47,6 +47,10 @@
*/
public enum TestHelper {
INSTANCE;
+ // commonly used jtreg constants
+ static final File TEST_CLASSES_DIR;
+ static final File TEST_SOURCES_DIR;
+
static final String JAVAHOME = System.getProperty("java.home");
static final boolean isSDK = JAVAHOME.endsWith("jre");
static final String javaCmd;
@@ -76,6 +80,18 @@
static int testExitValue = 0;
static {
+ String tmp = System.getProperty("test.classes", null);
+ if (tmp == null) {
+ throw new Error("property test.classes not defined ??");
+ }
+ TEST_CLASSES_DIR = new File(tmp).getAbsoluteFile();
+
+ tmp = System.getProperty("test.src", null);
+ if (tmp == null) {
+ throw new Error("property test.src not defined ??");
+ }
+ TEST_SOURCES_DIR = new File(tmp).getAbsoluteFile();
+
if (is64Bit && is32Bit) {
throw new RuntimeException("arch model cannot be both 32 and 64 bit");
}