Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
6dc6dbc8
Commit
6dc6dbc8
authored
Feb 25, 2019
by
Daniel Lehmberg
Browse files
fix (for now) for the Python script
parent
c951ddc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Tools/ContinuousIntegration/collect_line_and_branch_coverage.py
View file @
6dc6dbc8
...
...
@@ -46,6 +46,12 @@ def extract_line_and_branch_coverage(module_names):
coverage_report
=
file
.
read
()
# TODO: Regex seems be be broken on Windows CI worker. Find out why!
# This is a somewhat dirty fix for windows OS (I leave the todo open, if someone knows a cleaner solution.
# When parsing the html, there appear unicode(?) issues and in this case whitespaces are represented as Â\xa0
# I think this has something to do with it:
# https://stackoverflow.com/questions/13865346/why-would-a-python-regex-compile-on-linux-but-not-windows
coverage_report
=
coverage_report
.
replace
(
'Â
\xa0
'
,
' '
)
regex_pattern
=
re
.
compile
(
r
"Total.*?([0-9]{1,3})\s?%.*?([0-9]{1,3})\s?%"
)
match
=
regex_pattern
.
search
(
coverage_report
)
...
...
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