Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
8238710: LingeredApp doesn't log stdout/stderr if exits with non-zero…
… code
Reviewed-by: cjplummer, sspitsyn
- Loading branch information
Showing
with
11 additions
and
7 deletions.
-
+11
−7
test/lib/jdk/test/lib/apps/LingeredApp.java
|
@@ -357,13 +357,15 @@ public void runApp(String[] vmArguments) |
|
|
} |
|
|
|
|
|
private void finishApp() { |
|
|
OutputBuffer output = getOutput(); |
|
|
String msg = |
|
|
" LingeredApp stdout: [" + output.getStdout() + "];\n" + |
|
|
" LingeredApp stderr: [" + output.getStderr() + "]\n" + |
|
|
" LingeredApp exitValue = " + appProcess.exitValue(); |
|
|
if (appProcess != null) { |
|
|
OutputBuffer output = getOutput(); |
|
|
String msg = |
|
|
" LingeredApp stdout: [" + output.getStdout() + "];\n" + |
|
|
" LingeredApp stderr: [" + output.getStderr() + "]\n" + |
|
|
" LingeredApp exitValue = " + appProcess.exitValue(); |
|
|
|
|
|
System.err.println(msg); |
|
|
System.err.println(msg); |
|
|
} |
|
|
} |
|
|
|
|
|
/** |
|
@@ -377,12 +379,14 @@ public void stopApp() throws IOException { |
|
|
// an exception before the LA actually starts |
|
|
if (appProcess != null) { |
|
|
waitAppTerminate(); |
|
|
|
|
|
finishApp(); |
|
|
|
|
|
int exitcode = appProcess.exitValue(); |
|
|
if (exitcode != 0) { |
|
|
throw new IOException("LingeredApp terminated with non-zero exit code " + exitcode); |
|
|
} |
|
|
} |
|
|
finishApp(); |
|
|
} |
|
|
|
|
|
/** |
|
|