diff --git a/stf.build/include/top.xml b/stf.build/include/top.xml index f0f9f12..43ce102 100644 --- a/stf.build/include/top.xml +++ b/stf.build/include/top.xml @@ -132,7 +132,7 @@ limitations under the License. - + @@ -332,9 +332,9 @@ limitations under the License. --> - + - + diff --git a/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java b/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java index 5935ba9..23514ba 100644 --- a/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java +++ b/stf.core/src/stf.core/net/adoptopenjdk/stf/environment/StfEnvironmentCore.java @@ -94,6 +94,18 @@ public StfEnvironmentCore(ArrayList propertyFileDetails, Ar this.testRoots.add(defaultTestRoot); invocationProperties.put(Stf.ARG_TEST_ROOT.getName(), defaultTestRoot.getSpec()); } + + try { + String javaHome = System.getProperty("java.home"); + File javaLibDir = new File(javaHome, "../lib"); + if (javaLibDir.exists() && javaLibDir.isDirectory()) { + this.testRoots.add(new DirectoryRef(javaLibDir.getCanonicalPath())); + } else { + System.out.println("Java lib directory does not exist: " + javaLibDir.getCanonicalPath()); + } + } catch (IOException e) { + throw new RuntimeException("Failed to add Java lib directory to test roots", e); + } // Work out where the prereqs are if (!getProperty(Stf.ARG_SYSTEMTEST_PREREQS).isEmpty()) {