summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-04-20 13:20:22 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-04-20 13:20:22 +0200
commitf95858d5798f1da039c1265946c84891d8715a64 (patch)
tree4d45753708cab170a75b2f1025f5ab6dce90a027
parent52635828ba8eaae0ddf8db43b47822997de91ae1 (diff)
downloadcython-f95858d5798f1da039c1265946c84891d8715a64.tar.gz
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.
-rwxr-xr-xruntests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtests.py b/runtests.py
index 1042a48a2..989becce2 100755
--- a/runtests.py
+++ b/runtests.py
@@ -1245,11 +1245,14 @@ class CythonCompileTestCase(unittest.TestCase):
finally:
if show_output:
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:
print_bytes(
stdout, header_text="\n=== C/C++ compiler output: =========\n",
end=None, file=sys.__stderr__)
- stderr = get_stderr and filter_stderr(get_stderr()).strip()
if stderr:
print_bytes(
stderr, header_text="\n=== C/C++ compiler error output: ===\n",