test/tools/launcher/ExecutionEnvironment.java
Print this page
rev 8975 : 8028537: PPC64: Updated the JDK regression tests to run on AIX
Reviewed-by: alanb
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, volker.simonis@gmail.com
*** 70,79 ****
--- 70,81 ----
public class ExecutionEnvironment extends TestHelper {
static final String LD_LIBRARY_PATH = TestHelper.isMacOSX
? "DYLD_LIBRARY_PATH"
+ : TestHelper.isAIX
+ ? "LIBPATH"
: "LD_LIBRARY_PATH";
static final String LD_LIBRARY_PATH_32 = LD_LIBRARY_PATH + "_32";
static final String LD_LIBRARY_PATH_64 = LD_LIBRARY_PATH + "_64";
// Note: these paths need not exist on the filesytem
*** 142,155 ****
--- 144,169 ----
flagError(tr, "Error: No output at all. Did the test execute ?");
}
for (String x : LD_PATH_STRINGS) {
if (!tr.contains(x)) {
+ if (TestHelper.isAIX && x.startsWith(LD_LIBRARY_PATH)) {
+ // AIX does not support the '-rpath' linker options so the
+ // launchers have to prepend the jdk library path to 'LIBPATH'.
+ String aixLibPath = LD_LIBRARY_PATH + "=" +
+ System.getenv(LD_LIBRARY_PATH) +
+ System.getProperty("path.separator") + LD_LIBRARY_PATH_VALUE;
+ if (!tr.matches(aixLibPath)) {
+ flagError(tr, "FAIL: did not get <" + aixLibPath + ">");
+ }
+ }
+ else {
flagError(tr, "FAIL: did not get <" + x + ">");
}
}
}
+ }
/*
* ensures that there are no execs as long as we are in the same
* data model
*/
*** 178,188 ****
void testJavaLibraryPath() {
TestResult tr = null;
Map<String, String> env = new HashMap<>();
! if (TestHelper.isLinux || TestHelper.isMacOSX) {
for (String x : LD_PATH_STRINGS) {
String pairs[] = x.split("=");
env.put(pairs[0], pairs[1]);
}
--- 192,202 ----
void testJavaLibraryPath() {
TestResult tr = null;
Map<String, String> env = new HashMap<>();
! if (TestHelper.isLinux || TestHelper.isMacOSX || TestHelper.isAIX) {
for (String x : LD_PATH_STRINGS) {
String pairs[] = x.split("=");
env.put(pairs[0], pairs[1]);
}