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
044c2c21
Commit
044c2c21
authored
Apr 17, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix coverage analysis in test runner after sharding changes
parent
f925d315
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
runtests.py
runtests.py
+12
-10
No files found.
runtests.py
View file @
044c2c21
...
...
@@ -1456,14 +1456,16 @@ def main():
WITH_CYTHON
=
options
.
with_cython
coverage
=
None
if
options
.
coverage
or
options
.
coverage_xml
or
options
.
coverage_html
:
if
not
WITH_CYTHON
:
options
.
coverage
=
options
.
coverage_xml
=
options
.
coverage_html
=
False
else
:
from
coverage
import
coverage
as
_coverage
coverage
=
_coverage
(
branch
=
True
)
coverage
.
erase
()
coverage
.
start
()
if
not
options
.
shard_count
and
options
.
shard_num
<
0
:
if
not
WITH_CYTHON
:
options
.
coverage
=
options
.
coverage_xml
=
options
.
coverage_html
=
False
else
:
from
coverage
import
coverage
as
_coverage
coverage
=
_coverage
(
branch
=
True
)
coverage
.
erase
()
coverage
.
start
()
if
WITH_CYTHON
:
global
CompilationOptions
,
pyrex_default_options
,
cython_compile
...
...
@@ -1496,7 +1498,7 @@ def main():
else
:
return_code
=
0
else
:
_
,
return_code
=
runtests
(
options
,
cmd_args
)
_
,
return_code
=
runtests
(
options
,
cmd_args
,
coverage
)
print
(
"ALL DONE"
)
...
...
@@ -1513,7 +1515,7 @@ def runtests_callback(args):
options
.
shard_num
=
shard_num
return
runtests
(
options
,
cmd_args
)
def
runtests
(
options
,
cmd_args
):
def
runtests
(
options
,
cmd_args
,
coverage
=
None
):
WITH_CYTHON
=
options
.
with_cython
ROOTDIR
=
os
.
path
.
abspath
(
options
.
root_dir
)
...
...
@@ -1660,7 +1662,7 @@ def runtests(options, cmd_args):
result
=
test_runner
.
run
(
test_suite
)
if
options
.
coverage
or
options
.
coverage_xml
or
options
.
coverage_html
:
if
coverage
is
not
None
:
coverage
.
stop
()
ignored_modules
=
(
'Options'
,
'Version'
,
'DebugFlags'
,
'CmdLine'
)
modules
=
[
module
for
name
,
module
in
sys
.
modules
.
items
()
...
...
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