Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Boxiang Sun
erp5
Commits
a18ac474
Commit
a18ac474
authored
11 years ago
by
Sebastien Robin
Browse files
Options
Download
Email Patches
Plain Diff
take into account tests in public_stopped state
parent
99d417c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5/Tool/TaskDistributionTool.py
product/ERP5/Tool/TaskDistributionTool.py
+3
-3
No files found.
product/ERP5/Tool/TaskDistributionTool.py
View file @
a18ac474
...
...
@@ -93,12 +93,12 @@ class TaskDistributionTool(BaseTool):
previous_test_result_list
=
portal
.
test_result_module
.
searchFolder
(
title
=
'="%s"'
%
test_result
.
getTitle
(),
sort_on
=
[(
'creation_date'
,
'descending'
)],
simulation_state
=
'stopped'
,
simulation_state
=
(
'stopped'
,
'public_stopped'
),
limit
=
1
)
if
len
(
previous_test_result_list
):
previous_test_result
=
previous_test_result_list
[
0
].
getObject
()
for
line
in
previous_test_result
.
objectValues
():
if
line
.
getSimulationState
()
==
'stopped'
:
if
line
.
getSimulationState
()
in
(
'stopped'
,
'public_stopped'
)
:
duration_list
.
append
((
line
.
getTitle
(),
line
.
getProperty
(
'duration'
)))
duration_list
.
sort
(
key
=
lambda
x
:
-
x
[
1
])
sorted_test_list
=
[
x
[
0
]
for
x
in
duration_list
]
...
...
@@ -144,7 +144,7 @@ class TaskDistributionTool(BaseTool):
test_result
.
serialize
()
# prevent duplicate test result lines
createTestResultLineList
(
test_result
,
test_name_list
)
return
test_result
.
getRelativeUrl
(),
last_revision
if
last_state
in
(
'stopped'
,):
if
last_state
in
(
'stopped'
,
'public_stopped'
):
if
reference_list_string
is
not
None
:
if
reference_list_string
==
test_result
.
getReference
()
\
and
not
allow_restart
:
...
...
This diff is collapsed.
Click to expand it.
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