Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Paul Graydon
erp5
Commits
7b3e90bb
Commit
7b3e90bb
authored
Apr 03, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to define sub results in tests, like we do for selenium
parent
48907828
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
erp5/util/testsuite/__init__.py
erp5/util/testsuite/__init__.py
+22
-3
No files found.
erp5/util/testsuite/__init__.py
View file @
7b3e90bb
...
...
@@ -112,6 +112,16 @@ class TestSuite(object):
\
)
""", re.DOTALL | re.VERBOSE)
SUB_STATUS_RE = re.compile(
r"""SUB\
s+RESULT:
\s+(?P<all_tests>\
d+)
\s+Tests,\
s+
(?P<failures>\
d+)
\s+Failures\
s*
\
(?
(skipped=(?P<skips>\
d+),?
\s*)?
(expected\
s+
failures=(?P<expected_failures>\
d+),?
\s*)?
(unexpected\
s+successes=(?P<u
nexpected_successes>\
d+),?
\s*)?
\
)?
""",
re.DOTALL | re.VERBOSE)
mysql_db_count = 1
allow_restart = False
...
...
@@ -239,13 +249,22 @@ class EggTestSuite(TestSuite):
status_dict.update(duration=float(groupdict['
seconds
']),
test_count=int(groupdict['
all_tests
']))
search = self.STATUS_RE.search(test_log)
if search:
groupdict = search.groupdict()
status_dict.update(error_count=int(groupdict['
errors
'] or 0),
def updateStatusDictWithGroup(groupdict):
status_dict.update(error_count=int(groupdict.get('
errors
') or 0),
failure_count=int(groupdict['
failures
'] or 0)
+int(groupdict['
unexpected_successes
'] or 0),
skip_count=int(groupdict['
skips
'] or 0)
+int(groupdict['
expected_failures
'] or 0))
if search:
groupdict = search.groupdict()
updateStatusDictWithGroup(groupdict)
# In case the test is used to launch another one (like functional test),
# look for results inside stderr
sub_search = self.SUB_STATUS_RE.search(status_dict['
stdout
'])
if sub_search:
groupdict = sub_search.groupdict()
updateStatusDictWithGroup(groupdict)
status_dict.update(test_count=int(groupdict['
all_tests
']))
return status_dict
def getTestList(self):
...
...
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