Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Romain Courteaud
slapos
Commits
fcc47b94
Commit
fcc47b94
authored
Feb 16, 2016
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sometimes instead of number we get a dot, handle it properly.
parent
bb3da7f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
software/neoppod/runTestSuite.in
software/neoppod/runTestSuite.in
+12
-3
No files found.
software/neoppod/runTestSuite.in
View file @
fcc47b94
...
@@ -10,7 +10,7 @@ from time import gmtime, strftime
...
@@ -10,7 +10,7 @@ from time import gmtime, strftime
# pattern to get test counts from stdout
# pattern to get test counts from stdout
SUMMARY_RE = re.compile( \
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)
re.MULTILINE)
# NEO specific environment
# NEO specific environment
...
@@ -46,13 +46,22 @@ def parseTestStdOut(data):
...
@@ -46,13 +46,22 @@ def parseTestStdOut(data):
groupdict = search.groupdict()
groupdict = search.groupdict()
test_count = int(groupdict['test_count'])
test_count = int(groupdict['test_count'])
duration = float(groupdict['duration'])
duration = float(groupdict['duration'])
error_count = int(groupdict['error_count'])
expected_count = int(groupdict['expected_count'])
try:
try:
# it can match '.'!
# it can match '.'!
skip_count = int(groupdict['skip_count'])
skip_count = int(groupdict['skip_count'])
except ValueError:
except ValueError:
skip_count = 0
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
return test_count, error_count, expected_count, skip_count, duration
def main():
def main():
...
...
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