changeset 48408:e5e07e9361ec

8191273: applications/ctw/modules tests fail intermittently Reviewed-by: kvn, dlong
author iignatyev
date Fri, 01 Dec 2017 15:58:39 -0800
parents d8a62bea95d3
children e98710c4f6c1
files test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java	Fri Dec 01 15:53:15 2017 -0800
+++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java	Fri Dec 01 15:58:39 2017 -0800
@@ -123,14 +123,15 @@
                         .collect(Collectors.joining(" "));
                 String phase = phaseName(classStart);
                 Path out = Paths.get(".", phase + ".out");
+                Path err = Paths.get(".", phase + ".err");
                 System.out.printf("%s %dms START : [%s]%n" +
                         "cout/cerr are redirected to %s%n",
                         phase, TimeUnit.NANOSECONDS.toMillis(System.nanoTime()),
-                        commandLine, out);
-                int exitCode = pb.redirectErrorStream(true)
-                        .redirectOutput(out.toFile())
-                        .start()
-                        .waitFor();
+                        commandLine, phase);
+                int exitCode = pb.redirectOutput(out.toFile())
+                                 .redirectError(err.toFile())
+                                 .start()
+                                 .waitFor();
                 System.out.printf("%s %dms END : exit code = %d%n",
                         phase, TimeUnit.NANOSECONDS.toMillis(System.nanoTime()),
                         exitCode);