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
35895445
Commit
35895445
authored
Apr 06, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support writing XML coverage report in test runner
parent
6db16689
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
runtests.py
runtests.py
+9
-3
No files found.
runtests.py
View file @
35895445
...
@@ -752,6 +752,9 @@ if __name__ == '__main__':
...
@@ -752,6 +752,9 @@ if __name__ == '__main__':
parser
.
add_option
(
"-C"
,
"--coverage"
,
dest
=
"coverage"
,
parser
.
add_option
(
"-C"
,
"--coverage"
,
dest
=
"coverage"
,
action
=
"store_true"
,
default
=
False
,
action
=
"store_true"
,
default
=
False
,
help
=
"collect source coverage data for the Compiler"
)
help
=
"collect source coverage data for the Compiler"
)
parser
.
add_option
(
"--coverage-xml"
,
dest
=
"coverage_xml"
,
action
=
"store_true"
,
default
=
False
,
help
=
"collect source coverage data for the Compiler in XML format"
)
parser
.
add_option
(
"-A"
,
"--annotate"
,
dest
=
"annotate_source"
,
parser
.
add_option
(
"-A"
,
"--annotate"
,
dest
=
"annotate_source"
,
action
=
"store_true"
,
default
=
True
,
action
=
"store_true"
,
default
=
True
,
help
=
"generate annotated HTML versions of the test source files"
)
help
=
"generate annotated HTML versions of the test source files"
)
...
@@ -799,7 +802,7 @@ if __name__ == '__main__':
...
@@ -799,7 +802,7 @@ if __name__ == '__main__':
WITH_CYTHON
=
options
.
with_cython
WITH_CYTHON
=
options
.
with_cython
if
options
.
coverage
:
if
options
.
coverage
or
options
.
coverage_xml
:
if
not
WITH_CYTHON
:
if
not
WITH_CYTHON
:
options
.
coverage
=
False
options
.
coverage
=
False
else
:
else
:
...
@@ -924,14 +927,17 @@ if __name__ == '__main__':
...
@@ -924,14 +927,17 @@ if __name__ == '__main__':
result
=
test_runner
.
run
(
test_suite
)
result
=
test_runner
.
run
(
test_suite
)
if
options
.
coverage
:
if
options
.
coverage
or
options
.
coverage_xml
:
coverage
.
stop
()
coverage
.
stop
()
ignored_modules
=
(
'Options'
,
'Version'
,
'DebugFlags'
,
'CmdLine'
)
ignored_modules
=
(
'Options'
,
'Version'
,
'DebugFlags'
,
'CmdLine'
)
modules
=
[
module
for
name
,
module
in
sys
.
modules
.
items
()
modules
=
[
module
for
name
,
module
in
sys
.
modules
.
items
()
if
module
is
not
None
and
if
module
is
not
None
and
name
.
startswith
(
'Cython.Compiler.'
)
and
name
.
startswith
(
'Cython.Compiler.'
)
and
name
[
len
(
'Cython.Compiler.'
):]
not
in
ignored_modules
]
name
[
len
(
'Cython.Compiler.'
):]
not
in
ignored_modules
]
if
options
.
coverage
:
coverage
.
report
(
modules
,
show_missing
=
0
)
coverage
.
report
(
modules
,
show_missing
=
0
)
if
options
.
coverage_xml
:
coverage
.
xml_report
(
modules
,
show_missing
=
0
,
outfile
=
"coverage-report.xml"
)
if
missing_dep_excluder
.
tests_missing_deps
:
if
missing_dep_excluder
.
tests_missing_deps
:
sys
.
stderr
.
write
(
"Following tests excluded because of missing dependencies on your system:
\
n
"
)
sys
.
stderr
.
write
(
"Following tests excluded because of missing dependencies on your system:
\
n
"
)
...
...
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