RFR: 8354988: Separate stderr and stdout in Executor class from jpackage test lib
Alexander Matveev
almatvee at openjdk.org
Fri Apr 18 01:52:47 UTC 2025
On Thu, 17 Apr 2025 23:47:09 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
> Rework Executor class from jpackage test lib to support separate configuration of stdout and stderr streams handling:
> - New `Executor.discardStdout(boolean)` and `Executor.discardStderr(boolean)` methods enable/disable stdout and stderr streams, respectively;
> - New `Executor.Result.stdout()` accesses saved stdout stream;
> - New `Executor.Result.stderr()` accesses saved stderr stream;
> - `Executor.Result.getOutput()` returns merged stdout and stderr streams. Contents of the stdout go first, contents of the stderr follow;
> - New `JPackageCommand.discardStdout(boolean)` and `JPackageCommand.discardStderr(boolean)` methods enable/disable stdout and stderr streams produced by jpackage, respectively.
>
> Additionally:
> - Streamline `BasicTest.testErrorsAlwaysPrinted()`;
> - Fix WindowsHelper and Win8301247Test as they stopped working as expected due to reordering the contents of stdout and stderr streams in the merged stream returned by `Executor.Result.getOutput()`.
Looks good.
-------------
Marked as reviewed by almatvee (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24745#pullrequestreview-2777331746
More information about the core-libs-dev
mailing list