8141526: Allow to collect stdout/stderr from the FinalizationRunner even before the process returns
authorjbachorik
Fri, 06 Nov 2015 14:32:34 +0100
changeset 34698 7e09aed69592
parent 34377 88b91bf5db89
child 34699 2ca58af242b7
8141526: Allow to collect stdout/stderr from the FinalizationRunner even before the process returns Reviewed-by: dsamersoff
jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java
jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java
jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java
jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java
jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java
jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java
jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java
jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java
jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java	Fri Nov 06 14:32:34 2015 +0100
@@ -42,7 +42,11 @@
  * multiple times, then the line number won't provide enough context to
  * understand the failure.
  * </pre>
+ *
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib}
  */
+@Deprecated
 public class Asserts {
 
     /**
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java	Fri Nov 06 14:32:34 2015 +0100
@@ -27,6 +27,11 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
+/**
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ */
+@Deprecated
 public final class JDKToolFinder {
 
     private JDKToolFinder() {
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java	Fri Nov 06 14:32:34 2015 +0100
@@ -46,7 +46,10 @@
  * Process p = pb.start();
  * }
  * </pre>
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib}
  */
+@Deprecated
 public class JDKToolLauncher {
     private final String executable;
     private final List<String> vmArgs = new ArrayList<String>();
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java	Fri Nov 06 14:32:34 2015 +0100
@@ -33,7 +33,12 @@
 
 /**
  * Utility class for verifying output and exit value from a {@code Process}.
+ *
+ * @deprecated  This class is deprecated. Use the one from
+ *              {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *
  */
+@Deprecated
 public final class OutputAnalyzer {
     private final OutputBuffer output;
     private final String stdout;
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java	Fri Nov 06 14:32:34 2015 +0100
@@ -28,6 +28,11 @@
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
+/**
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ */
+@Deprecated
 class OutputBuffer {
     private static class OutputBufferException extends RuntimeException {
         private static final long serialVersionUID = 8528687792643129571L;
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java	Fri Nov 06 14:32:34 2015 +0100
@@ -27,6 +27,11 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 
+/**
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ */
+@Deprecated
 public class Platform {
     private static final String osName      = System.getProperty("os.name");
     private static final String dataModel   = System.getProperty("sun.arch.data.model");
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java	Fri Nov 06 14:32:34 2015 +0100
@@ -27,8 +27,6 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -42,6 +40,12 @@
 import java.util.function.Consumer;
 import java.util.stream.Collectors;
 
+
+/**
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ */
+@Deprecated
 public final class ProcessTools {
     private static final class LineForwarder extends StreamPumper.LinePump {
         private final PrintStream ps;
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java	Fri Nov 06 14:32:34 2015 +0100
@@ -34,6 +34,11 @@
 import java.util.concurrent.FutureTask;
 import java.util.concurrent.atomic.AtomicBoolean;
 
+/**
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ */
+@Deprecated
 public final class StreamPumper implements Runnable {
 
     private static final int BUF_SIZE = 256;
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Mon Nov 30 13:55:09 2015 -0800
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java	Fri Nov 06 14:32:34 2015 +0100
@@ -41,7 +41,11 @@
 
 /**
  * Common library for various test helper functions.
+ *
+ * @deprecated This class is deprecated. Use the one from
+ *             {@code <root>/test/lib/share/classes/jdk/test/lib}
  */
+@Deprecated
 public final class Utils {
 
     /**