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
fd6fcfbe
Commit
fd6fcfbe
authored
Jan 07, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --refnanny option to runtests.py
parent
026931cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
runtests.py
runtests.py
+12
-6
No files found.
runtests.py
View file @
fd6fcfbe
...
@@ -26,11 +26,6 @@ VER_DEP_MODULES = {
...
@@ -26,11 +26,6 @@ VER_DEP_MODULES = {
INCLUDE_DIRS
=
[
d
for
d
in
os
.
getenv
(
'INCLUDE'
,
''
).
split
(
os
.
pathsep
)
if
d
]
INCLUDE_DIRS
=
[
d
for
d
in
os
.
getenv
(
'INCLUDE'
,
''
).
split
(
os
.
pathsep
)
if
d
]
CFLAGS
=
os
.
getenv
(
'CFLAGS'
,
''
).
split
()
CFLAGS
=
os
.
getenv
(
'CFLAGS'
,
''
).
split
()
ctypes
.
PyDLL
(
"Cython/Runtime/refnanny.so"
,
mode
=
ctypes
.
RTLD_GLOBAL
)
sys
.
path
.
append
(
"Cython/Runtime"
)
import
refnanny
#CFLAGS.append("-DCYTHON_REFNANNY")
class
ErrorWriter
(
object
):
class
ErrorWriter
(
object
):
match_error
=
re
.
compile
(
'(warning:)?(?:.*:)?
\
s*([-
0
-9]+)
\
s*:
\
s*([-0-9]+)
\
s*:
\
s*(.*)'
).
match
match_error
=
re
.
compile
(
'(warning:)?(?:.*:)?
\
s*([-
0
-9]+)
\
s*:
\
s*([-0-9]+)
\
s*:
\
s*(.*)'
).
match
def
__init__
(
self
):
def
__init__
(
self
):
...
@@ -475,6 +470,9 @@ if __name__ == '__main__':
...
@@ -475,6 +470,9 @@ if __name__ == '__main__':
parser
.
add_option
(
"--cython-only"
,
dest
=
"cython_only"
,
parser
.
add_option
(
"--cython-only"
,
dest
=
"cython_only"
,
action
=
"store_true"
,
default
=
False
,
action
=
"store_true"
,
default
=
False
,
help
=
"only compile pyx to c, do not run C compiler or run the tests"
)
help
=
"only compile pyx to c, do not run C compiler or run the tests"
)
parser
.
add_option
(
"--refnanny"
,
dest
=
"with_refnanny"
,
action
=
"store_true"
,
default
=
False
,
help
=
"also test that Cython-generated code does correct reference counting"
)
parser
.
add_option
(
"--sys-pyregr"
,
dest
=
"system_pyregr"
,
parser
.
add_option
(
"--sys-pyregr"
,
dest
=
"system_pyregr"
,
action
=
"store_true"
,
default
=
False
,
action
=
"store_true"
,
default
=
False
,
help
=
"run the regression tests of the CPython installation"
)
help
=
"run the regression tests of the CPython installation"
)
...
@@ -518,6 +516,13 @@ if __name__ == '__main__':
...
@@ -518,6 +516,13 @@ if __name__ == '__main__':
from
Cython.Compiler
import
Errors
from
Cython.Compiler
import
Errors
Errors
.
LEVEL
=
0
# show all warnings
Errors
.
LEVEL
=
0
# show all warnings
if
options
.
with_refnanny
:
ctypes
.
PyDLL
(
"Cython/Runtime/refnanny.so"
,
mode
=
ctypes
.
RTLD_GLOBAL
)
sys
.
path
.
append
(
"Cython/Runtime"
)
import
refnanny
del
sys
.
path
[
-
1
]
CFLAGS
.
append
(
"-DCYTHON_REFNANNY"
)
# RUN ALL TESTS!
# RUN ALL TESTS!
ROOTDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
'tests'
)
ROOTDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
os
.
path
.
dirname
(
sys
.
argv
[
0
]),
'tests'
)
WORKDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
'BUILD'
)
WORKDIR
=
os
.
path
.
join
(
os
.
getcwd
(),
'BUILD'
)
...
@@ -599,4 +604,5 @@ if __name__ == '__main__':
...
@@ -599,4 +604,5 @@ if __name__ == '__main__':
for
test
in
missing_dep_excluder
.
tests_missing_deps
:
for
test
in
missing_dep_excluder
.
tests_missing_deps
:
sys
.
stderr
.
write
(
" %s
\
n
"
%
test
)
sys
.
stderr
.
write
(
" %s
\
n
"
%
test
)
print
"
\
n
"
.
join
([
repr
(
x
)
for
x
in
refnanny
.
reflog
])
if
options
.
with_refnanny
:
sys
.
stderr
.
write
(
"
\
n
"
.
join
([
repr
(
x
)
for
x
in
refnanny
.
reflog
]))
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