8061442: Update jdk/tools tests to remove check for the "jre" directory

Reviewed-by: alanb, ksrini
This commit is contained in:
Felix Yang 2014-12-17 13:41:49 -08:00 committed by Kumar Srinivasan
parent 024e2c06d7
commit d215225740
3 changed files with 8 additions and 21 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -51,9 +51,6 @@ public class JarEntryTime {
static void extractJar(File jarFile, boolean useExtractionTime) throws Throwable {
String javahome = System.getProperty("java.home");
if (javahome.endsWith("jre")) {
javahome = javahome.substring(0, javahome.length() - 4);
}
String jarcmd = javahome + File.separator + "bin" + File.separator + "jar";
String[] args;
if (useExtractionTime) {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -45,7 +45,7 @@
* a. if LD_LIBRARY_PATH64 is set it will override LD_LIBRARY_PATH
* b. LD_LIBRARY_PATH32 is ignored if set
* 5. no extra symlink exists on Solaris ie.
* jre/lib/$arch/libjvm.so -> client/libjvm.so
* lib/$arch/libjvm.so -> client/libjvm.so
* TODO:
* a. perhaps we need to add a test to audit all environment variables are
* in pristine condition after the launch, there may be a few that the
@ -267,7 +267,7 @@ public class ExecutionEnvironment extends TestHelper {
}
File symLink = null;
String libPathPrefix = isSDK ? "jre/lib" : "/lib";
String libPathPrefix = "/lib";
symLink = new File(JAVAHOME, libPathPrefix +
getJreArch() + "/" + LIBJVM);
if (symLink.exists()) {

@ -67,10 +67,7 @@ public class TestHelper {
static final String JAVAHOME = System.getProperty("java.home");
static final String JAVA_BIN;
static final String JAVA_JRE_BIN;
static final String JAVA_LIB;
static final String JAVA_JRE_LIB;
static final boolean isSDK = JAVAHOME.endsWith("jre");
static final String javaCmd;
static final String javawCmd;
static final String javacCmd;
@ -135,17 +132,10 @@ public class TestHelper {
}
compiler = ToolProvider.getSystemJavaCompiler();
File binDir = (isSDK)
? new File((new File(JAVAHOME)).getParentFile(), "bin")
: new File(JAVAHOME, "bin");
File binDir = new File(JAVAHOME, "bin");
JAVA_BIN = binDir.getAbsolutePath();
JAVA_JRE_BIN = new File(JAVAHOME, "bin").getAbsolutePath();
File libDir = (isSDK)
? new File((new File(JAVAHOME)).getParentFile(), "lib")
: new File(JAVAHOME, "lib");
File libDir = new File(JAVAHOME, "lib");
JAVA_LIB = libDir.getAbsolutePath();
JAVA_JRE_LIB = new File(JAVAHOME, "lib").getAbsolutePath();
File javaCmdFile = (isWindows)
? new File(binDir, "java.exe")
@ -191,11 +181,11 @@ public class TestHelper {
}
private static boolean haveVmVariant(String type) {
if (isWindows) {
File vmDir = new File(JAVA_JRE_BIN, type);
File vmDir = new File(JAVA_BIN, type);
File jvmFile = new File(vmDir, LIBJVM);
return jvmFile.exists();
} else {
File vmDir = new File(JAVA_JRE_LIB, type);
File vmDir = new File(JAVA_LIB, type);
File vmArchDir = new File(vmDir, getJreArch());
File jvmFile = new File(vmArchDir, LIBJVM);
return jvmFile.exists();