Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
6343286d
Commit
6343286d
authored
Aug 25, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to reduce test log clutter in MSVC output.
parent
be90a72b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
Cython/Utils.py
Cython/Utils.py
+3
-1
runtests.py
runtests.py
+20
-6
No files found.
Cython/Utils.py
View file @
6343286d
...
...
@@ -430,7 +430,9 @@ def captured_fd(stream=2, encoding=None):
os
.
close
(
orig_stream
)
def
print_bytes
(
s
,
end
=
b'
\
n
'
,
file
=
sys
.
stdout
,
flush
=
True
):
def
print_bytes
(
s
,
header_text
=
None
,
end
=
b'
\
n
'
,
file
=
sys
.
stdout
,
flush
=
True
):
if
header_text
:
file
.
write
(
header_text
)
# note: text! => file.write() instead of out.write()
file
.
flush
()
try
:
out
=
file
.
buffer
# Py3
...
...
runtests.py
View file @
6343286d
...
...
@@ -752,6 +752,18 @@ def skip_c(tags):
return False
def filter_stderr(stderr_bytes):
"""
Filter
annoying
warnings
from
output
.
"""
if b"Command line warning D9025" in stderr_bytes:
# MSCV: cl : Command line warning D9025 : overriding '/Ox' with '/Od'
stderr_bytes = b'
\
n
'.join(
line for line in stderr_bytes.splitlines()
if b"Command line warning D9025" not in line)
return stderr_bytes
class CythonCompileTestCase(unittest.TestCase):
def __init__(self, test_directory, workdir, module, tags, language='c', preparse='id',
expect_errors=False, expect_warnings=False, annotate=False, cleanup_workdir=True,
...
...
@@ -1126,14 +1138,16 @@ class CythonCompileTestCase(unittest.TestCase):
if show_output:
stdout = get_stdout and get_stdout().strip()
if stdout:
tostderr("
\
n
=== C/C++ compiler output: ===
\
n
")
print_bytes(stdout, end=None, file=sys.__stderr__)
stderr = get_stderr and get_stderr().strip()
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:
tostderr("
\
n
=== C/C++ compiler error output: ===
\
n
")
print_bytes(stderr, end=None, file=sys.__stderr__)
print_bytes(
stderr, header_text="
\
n
=== C/C++ compiler error output: ===
\
n
",
end=None, file=sys.__stderr__)
if stdout or stderr:
tostderr("
\
n
==============================
\
n
")
tostderr("
\
n
==============================
======
\
n
")
return so_path
def _match_output(self, expected_output, actual_output, write):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment