Commit fcc47b94 authored by Ivan Tyagov's avatar Ivan Tyagov

Sometimes instead of number we get a dot, handle it properly.

parent bb3da7f8
......@@ -10,7 +10,7 @@ from time import gmtime, strftime
# pattern to get test counts from stdout
SUMMARY_RE = re.compile( \
r'^(.*)Summary (.*) (?P<test_count>\d+) (.*) (?P<error_count>\d+) (.*) (?P<expected_count>\d+) (.*) (?P<skip_count>\d+|\.) (.*) (?P<duration>\d+(\.\d*)?|\.\d+)s', \
r'^(.*)Summary (.*) (?P<test_count>\d+) (.*) (?P<error_count>\d+|\.) (.*) (?P<expected_count>\d+|\.) (.*) (?P<skip_count>\d+|\.) (.*) (?P<duration>\d+(\.\d*)?|\.\d+)s', \
re.MULTILINE)
# NEO specific environment
......@@ -46,13 +46,22 @@ def parseTestStdOut(data):
groupdict = search.groupdict()
test_count = int(groupdict['test_count'])
duration = float(groupdict['duration'])
error_count = int(groupdict['error_count'])
expected_count = int(groupdict['expected_count'])
try:
# it can match '.'!
skip_count = int(groupdict['skip_count'])
except ValueError:
skip_count = 0
try:
# it can match '.'!
error_count = int(groupdict['error_count'])
except ValueError:
error_count = 0
try:
# it can match '.'!
expected_count = int(groupdict['expected_count'])
except ValueError:
expected_count = 0
return test_count, error_count, expected_count, skip_count, duration
def main():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment