On Thu, 17 Apr 2025 23:47:09 GMT, Alexey Semenyuk <asemen...@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()`.

This pull request has now been integrated.

Changeset: 22e8a97a
Author:    Alexey Semenyuk <asemen...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/22e8a97a1ce4e1c781fbc6f1e271c477fe95f069
Stats:     659 lines in 7 files changed: 488 ins; 58 del; 113 mod

8354988: Separate stderr and stdout in Executor class from jpackage test lib

Reviewed-by: almatvee

-------------

PR: https://git.openjdk.org/jdk/pull/24745

Reply via email to