< prev index next >

test/hotspot/jtreg/gtest/GTestWrapper.java

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

@@ -35,10 +35,11 @@
 
 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,13 +74,20 @@
         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);
+
+        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 >