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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
cb6c5f7d
Commit
cb6c5f7d
authored
Jan 23, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip gdb if Python compiled with gdb not >= 2.5.
parent
ab629168
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
Cython/Debugger/Tests/TestLibCython.py
Cython/Debugger/Tests/TestLibCython.py
+14
-2
No files found.
Cython/Debugger/Tests/TestLibCython.py
View file @
cb6c5f7d
...
...
@@ -166,15 +166,27 @@ class GdbDebuggerTestCase(DebuggerTestCase):
p
.
wait
()
p
.
stdout
.
close
()
if
have_gdb
:
python_version_script
=
tempfile
.
NamedTemporaryFile
()
python_version_script
.
write
(
'python import sys; print sys.version_info
\
n
'
)
python_version_script
.
flush
()
p
=
subprocess
.
Popen
([
'gdb'
,
'-batch'
,
'-x'
,
python_version_script
.
name
],
stdout
=
subprocess
.
PIPE
)
python_version
=
p
.
stdout
.
read
().
decode
(
'ascii'
)
p
.
wait
()
python_version_number
=
[
int
(
a
.
strip
())
for
a
in
python_version
.
strip
(
'()'
).
split
(
','
)[:
3
]]
if
have_gdb
:
# Based on Lib/test/test_gdb.py
regex
=
"^GNU gdb [^
\
d]*(
\
d+)
\
.(
\
d+)"
gdb_version_number
=
re
.
search
(
regex
,
gdb_version
).
groups
()
# Be Python 3 compatible
if
not
have_gdb
or
list
(
map
(
int
,
gdb_version_number
))
<
[
7
,
2
]:
if
(
not
have_gdb
or
list
(
map
(
int
,
gdb_version_number
))
<
[
7
,
2
]
or
python_version_number
<
[
2
,
5
]):
self
.
p
=
None
warnings
.
warn
(
'Skipping gdb tests, need gdb >= 7.2'
)
warnings
.
warn
(
'Skipping gdb tests, need gdb >= 7.2
with Python >= 2.5
'
)
else
:
self
.
p
=
subprocess
.
Popen
(
args
,
...
...
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