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
Boxiang Sun
cython
Commits
0e0b73b9
Commit
0e0b73b9
authored
Jul 19, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow skipping CPython regression tests in test runner with --no-pyregr
parent
eb4ef08d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
runtests.py
runtests.py
+11
-2
No files found.
runtests.py
View file @
0e0b73b9
...
...
@@ -45,12 +45,14 @@ class ErrorWriter(object):
return
self
.
_collect
(
True
,
True
)
class
TestBuilder
(
object
):
def
__init__
(
self
,
rootdir
,
workdir
,
selectors
,
annotate
,
cleanup_workdir
):
def
__init__
(
self
,
rootdir
,
workdir
,
selectors
,
annotate
,
cleanup_workdir
,
with_pyregr
):
self
.
rootdir
=
rootdir
self
.
workdir
=
workdir
self
.
selectors
=
selectors
self
.
annotate
=
annotate
self
.
cleanup_workdir
=
cleanup_workdir
self
.
with_pyregr
=
with_pyregr
def
build_suite
(
self
):
suite
=
unittest
.
TestSuite
()
...
...
@@ -62,6 +64,8 @@ class TestBuilder(object):
continue
path
=
os
.
path
.
join
(
self
.
rootdir
,
filename
)
if
os
.
path
.
isdir
(
path
)
and
filename
in
TEST_DIRS
:
if
filename
==
'pyregr'
and
not
self
.
with_pyregr
:
continue
suite
.
addTest
(
self
.
handle_directory
(
path
,
filename
))
return
suite
...
...
@@ -312,6 +316,9 @@ if __name__ == '__main__':
parser
.
add_option
(
"--no-file"
,
dest
=
"filetests"
,
action
=
"store_false"
,
default
=
True
,
help
=
"do not run the file based tests"
)
parser
.
add_option
(
"--no-pyregr"
,
dest
=
"pyregr"
,
action
=
"store_false"
,
default
=
True
,
help
=
"do not run the regression tests of CPython in tests/pyregr/"
)
parser
.
add_option
(
"-C"
,
"--coverage"
,
dest
=
"coverage"
,
action
=
"store_true"
,
default
=
False
,
help
=
"collect source coverage data for the Compiler"
)
...
...
@@ -368,7 +375,9 @@ if __name__ == '__main__':
if
options
.
filetests
:
filetests
=
TestBuilder
(
ROOTDIR
,
WORKDIR
,
selectors
,
options
.
annotate_source
,
options
.
cleanup_workdir
)
options
.
annotate_source
,
options
.
cleanup_workdir
,
options
.
pyregr
)
test_suite
.
addTests
([
filetests
.
build_suite
()])
unittest
.
TextTestRunner
(
verbosity
=
options
.
verbosity
).
run
(
test_suite
)
...
...
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