test/tools/launcher/ExecutionEnvironment.java
Print this page
*** 1,7 ****
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2009, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 182,200 ****
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]);
! }
!
! tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
! verifyJavaLibraryPathGeneric(tr);
! } else { // Solaris
// no override
env.clear();
env.put(LD_LIBRARY_PATH, LD_LIBRARY_PATH_VALUE);
tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
verifyJavaLibraryPathGeneric(tr);
--- 182,192 ----
void testJavaLibraryPath() {
TestResult tr = null;
Map<String, String> env = new HashMap<>();
! if (TestHelper.isSolaris) {
// no override
env.clear();
env.put(LD_LIBRARY_PATH, LD_LIBRARY_PATH_VALUE);
tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
verifyJavaLibraryPathGeneric(tr);
*** 206,215 ****
--- 198,215 ----
}
// verify the override occurs for 64-bit system
tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
verifyJavaLibraryPathOverride(tr, false);
+ } else {
+ for (String x : LD_PATH_STRINGS) {
+ String pairs[] = x.split("=");
+ env.put(pairs[0], pairs[1]);
+ }
+
+ tr = doExec(env, javaCmd, "-jar", testJarFile.getAbsolutePath());
+ verifyJavaLibraryPathGeneric(tr);
}
}
private void verifyJavaLibraryPathGeneric(TestResult tr) {
if (!tr.matches("java.library.path=.*" + LD_LIBRARY_PATH_VALUE + ".*")) {