Commit f95858d5 authored by Stefan Behnel's avatar Stefan Behnel

Suppress non-error output of the C compiler in test runner unless there is a...

Suppress non-error output of the C compiler in test runner unless there is a test failure or at least some error output as well.
parent 52635828
...@@ -1245,11 +1245,14 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -1245,11 +1245,14 @@ class CythonCompileTestCase(unittest.TestCase):
finally: finally:
if show_output: if show_output:
stdout = get_stdout and get_stdout().strip() stdout = get_stdout and get_stdout().strip()
stderr = get_stderr and filter_stderr(get_stderr()).strip()
if so_path and not stderr:
# normal success case => ignore non-error compiler output
stdout = None
if stdout: if stdout:
print_bytes( print_bytes(
stdout, header_text="\n=== C/C++ compiler output: =========\n", stdout, header_text="\n=== C/C++ compiler output: =========\n",
end=None, file=sys.__stderr__) end=None, file=sys.__stderr__)
stderr = get_stderr and filter_stderr(get_stderr()).strip()
if stderr: if stderr:
print_bytes( print_bytes(
stderr, header_text="\n=== C/C++ compiler error output: ===\n", stderr, header_text="\n=== C/C++ compiler error output: ===\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment