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
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
Xueyun Qian
erp5
Commits
ddcb5001
Commit
ddcb5001
authored
May 10, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark test as FAILED in case of "unexpected success
parent
c21768a8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
product/ERP5/bin/run_test_suite
product/ERP5/bin/run_test_suite
+6
-5
product/ERP5Type/tests/ERP5TypeTestSuite.py
product/ERP5Type/tests/ERP5TypeTestSuite.py
+6
-5
product/ERP5Type/tests/backportUnittest.py
product/ERP5Type/tests/backportUnittest.py
+4
-0
No files found.
product/ERP5/bin/run_test_suite
View file @
ddcb5001
...
@@ -332,11 +332,12 @@ class ERP5TypeTestSuite(TestSuite):
...
@@ -332,11 +332,12 @@ class ERP5TypeTestSuite(TestSuite):
search = self.STATUS_RE.search(test_log)
search = self.STATUS_RE.search(test_log)
if search:
if search:
groupdict = search.groupdict()
groupdict = search.groupdict()
status_dict.update(error_count=int(groupdict['
errors
'] or 0),
status_dict.update(
failure_count=int(groupdict['
failures
'] or 0),
error_count=int(groupdict['
errors
'] or 0),
failure_count=int(groupdict['
failures
'] or 0)
+int(groupdict['
unexpected_successes
'] or 0),
skip_count=int(groupdict['
skips
'] or 0)
skip_count=int(groupdict['
skips
'] or 0)
+int(groupdict['
expected_failures
'] or 0)
+int(groupdict['
expected_failures
'] or 0))
+int(groupdict['
unexpected_successes
'] or 0))
return status_dict
return status_dict
...
...
product/ERP5Type/tests/ERP5TypeTestSuite.py
View file @
ddcb5001
...
@@ -233,11 +233,12 @@ class ERP5TypeTestSuite(TestSuite):
...
@@ -233,11 +233,12 @@ class ERP5TypeTestSuite(TestSuite):
search = self.STATUS_RE.search(test_log)
search = self.STATUS_RE.search(test_log)
if search:
if search:
groupdict = search.groupdict()
groupdict = search.groupdict()
status_dict.update(error_count=int(groupdict['
errors
'] or 0),
status_dict.update(
failure_count=int(groupdict['
failures
'] or 0),
error_count=int(groupdict['
errors
'] or 0),
failure_count=int(groupdict['
failures
'] or 0)
+int(groupdict['
unexpected_successes
'] or 0),
skip_count=int(groupdict['
skips
'] or 0)
skip_count=int(groupdict['
skips
'] or 0)
+int(groupdict['
expected_failures
'] or 0)
+int(groupdict['
expected_failures
'] or 0))
+int(groupdict['
unexpected_successes
'] or 0))
return status_dict
return status_dict
class ProjectTestSuite(ERP5TypeTestSuite):
class ProjectTestSuite(ERP5TypeTestSuite):
...
...
product/ERP5Type/tests/backportUnittest.py
View file @
ddcb5001
...
@@ -207,6 +207,10 @@ class _TextTestResult(unittest._TextTestResult, TestResult):
...
@@ -207,6 +207,10 @@ class _TextTestResult(unittest._TextTestResult, TestResult):
unittest
.
_TextTestResult
.
__init__
(
self
,
stream
,
descriptions
,
verbosity
)
unittest
.
_TextTestResult
.
__init__
(
self
,
stream
,
descriptions
,
verbosity
)
TestResult
.
__init__
(
self
)
TestResult
.
__init__
(
self
)
def
wasSuccessful
(
self
):
"Tells whether or not this result was a success"
return
not
(
self
.
failures
or
self
.
errors
or
self
.
unexpectedSuccesses
)
def
addSkip
(
self
,
test
,
reason
):
def
addSkip
(
self
,
test
,
reason
):
super
(
_TextTestResult
,
self
).
addSkip
(
test
,
reason
)
super
(
_TextTestResult
,
self
).
addSkip
(
test
,
reason
)
if
self
.
showAll
:
if
self
.
showAll
:
...
...
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