< prev index next >
test/src/jdk/nashorn/internal/test/framework/ScriptRunnable.java
Print this page
@@ -192,13 +192,13 @@
final ProcessBuilder pb = new ProcessBuilder(cmd);
pb.redirectOutput(outputFileHandle);
pb.redirectError(errorFileHandle);
final Process process = pb.start();
- process.waitFor();
+ final int exitCode = process.waitFor();
- if (errorFileHandle.length() > 0) {
+ if (exitCode != 0 || errorFileHandle.length() > 0) {
if (expectRunFailure) {
return;
}
if (!ignoreStdError) {
if (outputFileHandle.length() > 0) {
< prev index next >