< prev index next >

test/hotspot/jtreg/gtest/GTestWrapper.java

Print this page
rev 60538 : imported patch jep387-test.patch

*** 35,44 **** --- 35,45 ---- import java.io.File; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; + import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; public class GTestWrapper {
*** 73,85 **** if (ldLibraryPath != null) { env.put(pathVar, path + File.pathSeparator + ldLibraryPath); } Path resultFile = Paths.get("test_result.xml"); ! pb.command(execPath.toAbsolutePath().toString(), ! "-jdk", Utils.TEST_JDK, ! "--gtest_output=xml:" + resultFile); int exitCode = ProcessTools.executeCommand(pb).getExitValue(); if (exitCode != 0) { List<String> failedTests = failedTests(resultFile); String message = "gtest execution failed; exit code = " + exitCode + "."; if (!failedTests.isEmpty()) { --- 74,93 ---- if (ldLibraryPath != null) { env.put(pathVar, path + File.pathSeparator + ldLibraryPath); } Path resultFile = Paths.get("test_result.xml"); ! ! ArrayList<String> command = new ArrayList<>(); ! command.add(execPath.toAbsolutePath().toString()); ! command.add("-jdk"); ! command.add(Utils.TEST_JDK); ! command.add("--gtest_output=xml:" + resultFile); ! for (String a : args) { ! command.add(a); ! } ! pb.command(command); int exitCode = ProcessTools.executeCommand(pb).getExitValue(); if (exitCode != 0) { List<String> failedTests = failedTests(resultFile); String message = "gtest execution failed; exit code = " + exitCode + "."; if (!failedTests.isEmpty()) {
< prev index next >