mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
JSSpecCompiler: Print stderr in test runner if compiler invocation fails
This commit is contained in:
parent
8126e76e59
commit
8afbeb1892
1 changed files with 8 additions and 1 deletions
|
@ -166,8 +166,15 @@ TEST_CASE(test_regression)
|
||||||
bool exited_with_code_0 = MUST(process.wait_for_termination());
|
bool exited_with_code_0 = MUST(process.wait_for_termination());
|
||||||
EXPECT(exited_with_code_0);
|
EXPECT(exited_with_code_0);
|
||||||
|
|
||||||
if (exited_with_code_0)
|
if (!exited_with_code_0) {
|
||||||
|
auto captured_output = read(path_to_captured_stderr);
|
||||||
|
if (!captured_output.is_error()) {
|
||||||
|
StringView stderr_output_view = captured_output.value();
|
||||||
|
dbgln("Compiler invocation failed. Captured output:\n{}", stderr_output_view);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
check_expectations(path_to_expectation, path_to_captured_stderr, should_update_expectations);
|
check_expectations(path_to_expectation, path_to_captured_stderr, should_update_expectations);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue