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
Gwenaël Samain
cython
Commits
6a85d21e
Commit
6a85d21e
authored
Jan 28, 2011
by
Mark Florisson
Committed by
Robert Bradshaw
Feb 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debugger: made test less verbose (#645)
parent
bbfefeb1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
29 deletions
+44
-29
Cython/Debugger/Tests/TestLibCython.py
Cython/Debugger/Tests/TestLibCython.py
+42
-27
Cython/Debugger/Tests/test_libcython_in_gdb.py
Cython/Debugger/Tests/test_libcython_in_gdb.py
+2
-2
No files found.
Cython/Debugger/Tests/TestLibCython.py
View file @
6a85d21e
...
...
@@ -105,7 +105,6 @@ class DebuggerTestCase(unittest.TestCase):
)
optimization_disabler
=
build_ext
.
Optimization
()
optimization_disabler
.
disable_optimization
()
cython_compile_testcase
=
runtests
.
CythonCompileTestCase
(
workdir
=
self
.
tempdir
,
...
...
@@ -114,6 +113,14 @@ class DebuggerTestCase(unittest.TestCase):
**
opts
)
new_stderr
=
open
(
os
.
devnull
,
'w'
)
stderr
=
sys
.
stderr
sys
.
stderr
=
new_stderr
optimization_disabler
.
disable_optimization
()
try
:
cython_compile_testcase
.
run_cython
(
targetdir
=
self
.
tempdir
,
incdir
=
None
,
...
...
@@ -131,8 +138,9 @@ class DebuggerTestCase(unittest.TestCase):
extra_extension_args
=
{
'extra_objects'
:[
'cfuncs.o'
]},
**
opts
)
finally
:
optimization_disabler
.
restore_state
()
sys
.
stderr
=
stderr
# ext = Cython.Distutils.extension.Extension(
# 'codefile',
...
...
@@ -272,12 +280,19 @@ class TestAll(GdbDebuggerTestCase):
out
,
err
=
self
.
p
.
communicate
()
err
=
err
.
decode
(
'UTF-8'
)
exit_status
=
self
.
p
.
wait
()
if
exit_status
==
1
:
sys
.
stderr
.
write
(
err
)
elif
exit_status
>=
2
:
border
=
'*'
*
30
start
=
'%s v INSIDE GDB v %s'
%
(
border
,
border
)
end
=
'%s ^ INSIDE GDB ^ %s'
%
(
border
,
border
)
errmsg
=
'
\
n
%s
\
n
%s%s'
%
(
start
,
err
,
end
)
self
.
assertEquals
(
0
,
self
.
p
.
wait
(),
errmsg
)
sys
.
stderr
.
write
(
err
)
sys
.
stderr
.
write
(
errmsg
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Cython/Debugger/Tests/test_libcython_in_gdb.py
View file @
6a85d21e
...
...
@@ -428,7 +428,7 @@ def run_unittest_in_module(modulename):
"debugging information. Either compile python with "
"-g or get a debug build (configure with --with-pydebug)."
)
warnings
.
warn
(
msg
)
os
.
_exit
(
0
)
os
.
_exit
(
1
)
else
:
m
=
__import__
(
modulename
,
fromlist
=
[
''
])
tests
=
inspect
.
getmembers
(
m
,
inspect
.
isclass
)
...
...
@@ -453,7 +453,7 @@ def runtests():
success_libpython
=
run_unittest_in_module
(
test_libpython_in_gdb
.
__name__
)
if
not
success_libcython
or
not
success_libpython
:
sys
.
exit
(
1
)
sys
.
exit
(
2
)
def
main
(
version
,
trace_code
=
False
):
global
inferior_python_version
...
...
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