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
Aurélien Vermylen
erp5
Commits
916e1d00
Commit
916e1d00
authored
Apr 18, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_test_result: workaround for NEO test results
parent
d6d7b72d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_result_workflow/scripts/TestResult_complete.py
...kflow/test_result_workflow/scripts/TestResult_complete.py
+13
-3
No files found.
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_result_workflow/scripts/TestResult_complete.py
View file @
916e1d00
test_result
=
sci
[
'object'
]
kw
=
sci
[
'kwargs'
]
test_result
.
setStopDate
(
kw
.
get
(
'date'
)
or
DateTime
())
def
unexpected
(
test_result
):
# We must change to only distinguish SKIP/EXPECTED/UNEXPECTED, instead of
# SKIP/FAIL/ERROR. NEO reports EXPECTED as FAIL and we want to mark it as
# passed if there's no unexpected failures.
return
test_result
.
getSourceProjectTitle
()
!=
"NEO R&D"
if
test_result
.
getPortalType
()
==
'Test Result'
:
has_unknown_result
=
False
edit_kw
=
dict
(
duration
=
0
,
...
...
@@ -15,8 +22,11 @@ if test_result.getPortalType() == 'Test Result':
except
TypeError
as
e
:
context
.
log
(
""
,
repr
(
e
))
has_unknown_result
=
True
has_unknown_result
=
has_unknown_result
or
line
.
getStringIndex
()
==
'UNKNOWN'
if
has_unknown_result
or
edit_kw
[
'errors'
]
or
edit_kw
[
'failures'
]:
else
:
if
line
.
getStringIndex
()
==
'UNKNOWN'
:
has_unknown_result
=
True
if
has_unknown_result
or
edit_kw
[
'errors'
]
or
(
edit_kw
[
'failures'
]
and
unexpected
(
test_result
)):
status
=
'FAIL'
else
:
status
=
'PASS'
...
...
@@ -30,7 +40,7 @@ elif test_result.getPortalType() == 'Test Result Line':
if
all_tests
is
None
:
status
=
'UNKNOWN'
all_tests
=
0
elif
errors
or
failures
:
elif
errors
or
failures
and
unexpected
(
test_result
.
getParentValue
())
:
status
=
'FAILED'
else
:
status
=
'PASSED'
...
...
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