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
048b253d
Commit
048b253d
authored
Mar 18, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
49f586d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
21 deletions
+18
-21
software/neoppod/runTestSuite.in
software/neoppod/runTestSuite.in
+18
-21
No files found.
software/neoppod/runTestSuite.in
View file @
048b253d
...
...
@@ -7,9 +7,10 @@ from erp5.util import taskdistribution
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', \
re.MULTILINE)
SUMMARY_RE = re.compile(
r'^(.*)Summary (.*) (?P<test_count>\d+) (.*) (?P<unexpected_count>\d+|\.)'
r' (.*) (?P<expected_count>\d+|\.) (.*) (?P<skip_count>\d+|\.)'
r' (.*) (?P<duration>\d+(\.\d*)?|\.\d+)s', re.MULTILINE)
# NEO specific environment
TEMP_DIRECTORY = '{{neo_temp_directory}}/neo_tests'
...
...
@@ -21,7 +22,7 @@ def parseTestStdOut(data):
Parse output of NEO testrunner script.
"""
test_count = 0
error
_count = 0
unexpected
_count = 0
expected_count = 0
skip_count = 0
duration = 0
...
...
@@ -34,36 +35,32 @@ def parseTestStdOut(data):
# it can match '.'!
skip_count = int(groupdict['skip_count'])
except ValueError:
skip_count = 0
pass
try:
# it can match '.'!
error_count = int(groupdict['error
_count'])
unexpected_count = int(groupdict['unexpected
_count'])
except ValueError:
error_count = 0
pass
try:
# it can match '.'!
expected_count = int(groupdict['expected_count'])
expected_count = int(groupdict['expected_count'])
except ValueError:
expected_count = 0
pass
return test_count,
error
_count, expected_count, skip_count, duration
return test_count,
unexpected
_count, expected_count, skip_count, duration
def main():
parser = argparse.ArgumentParser(description='Run a test suite.')
parser.add_argument('--test_suite', help='The test suite name')
parser.add_argument('--test_suite_title', help='The test suite title',
default=None)
parser.add_argument('--test_node_title', help='The test node title',
default=None)
parser.add_argument('--project_title', help='The project title',
default=None)
parser.add_argument('--test_suite_title', help='The test suite title')
parser.add_argument('--test_node_title', help='The test node title')
parser.add_argument('--project_title', help='The project title')
parser.add_argument('--revision', help='The revision to test',
default='dummy_revision')
parser.add_argument('--node_quantity', help='Number of parallel tests to run',
default=1, type=int)
parser.add_argument('--master_url',
help='The Url of Master controling many suites',
default=None)
help='The Url of Master controling many suites')
args = parser.parse_args()
...
...
@@ -115,7 +112,7 @@ def main():
# parse test stdout / stderr, hint to speed up use files first!
stdout, stderr = p.communicate()
date = strftime("%Y/%m/%d %H:%M:%S", gmtime())
test_count,
error
_count, expected_count, skip_count, duration = \
test_count,
unexpected
_count, expected_count, skip_count, duration = \
parseTestStdOut(stdout)
# print to stdout so we can see in testnode logs
...
...
@@ -125,8 +122,8 @@ def main():
# report status back to Nexedi ERP5
test_result_line.stop(
test_count = test_count,
error_count =
error_count,
failure_count = expected_count,
error_count =
unexpected_count, # XXX
failure_count = expected_count,
# XXX
skip_count = skip_count,
duration = duration,
date = date,
...
...
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