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
Iliya Manolov
erp5
Commits
65b7c937
Commit
65b7c937
authored
Jul 01, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test result: create test results line in same order
This is in order for tests to have the same id on each test run
parent
30066147
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
bt5/erp5_test_result/TestTemplateItem/portal_components/test.erp5.testTaskDistribution.py
...eItem/portal_components/test.erp5.testTaskDistribution.py
+4
-4
bt5/erp5_test_result/bt/revision
bt5/erp5_test_result/bt/revision
+1
-1
product/ERP5/Tool/TaskDistributionTool.py
product/ERP5/Tool/TaskDistributionTool.py
+3
-1
No files found.
bt5/erp5_test_result/TestTemplateItem/portal_components/test.erp5.testTaskDistribution.py
View file @
65b7c937
...
...
@@ -302,8 +302,8 @@ class TestTaskDistribution(ERP5TypeTestCase):
line_url
,
test
=
self
.
tool
.
startUnitTest
(
test_result_path
)
next_line_url
,
next_test
=
self
.
tool
.
startUnitTest
(
test_result_path
)
# first launch, we have no time optimisations, so tests are
# launched in
the given
order
self
.
assertEqual
([
'test
Foo'
,
'testBar
'
],
[
test
,
next_test
])
# launched in
alphabetical
order
self
.
assertEqual
([
'test
Bar'
,
'testFoo
'
],
[
test
,
next_test
])
status_dict
=
{}
self
.
tool
.
stopUnitTest
(
line_url
,
status_dict
)
self
.
tool
.
stopUnitTest
(
next_line_url
,
status_dict
)
...
...
@@ -318,7 +318,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
# Make sure second test takes more time
next_line
.
duration
=
line
.
duration
+
1
# So if we launch another unit test, it will process first the
# one wich is the slowest
# one w
h
ich is the slowest
self
.
assertEqual
(
"stopped"
,
test_result
.
getSimulationState
())
self
.
tic
()
next_test_result_path
,
revision
=
self
.
_createTestResult
(
...
...
@@ -326,7 +326,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
self
.
assertNotEquals
(
next_test_result_path
,
test_result_path
)
line_url
,
test
=
self
.
tool
.
startUnitTest
(
next_test_result_path
)
next_line_url
,
next_test
=
self
.
tool
.
startUnitTest
(
next_test_result_path
)
self
.
assertEqual
([
'test
Bar'
,
'testFoo
'
],
[
test
,
next_test
])
self
.
assertEqual
([
'test
Foo'
,
'testBar
'
],
[
test
,
next_test
])
def
test_07_reportTaskFailure
(
self
):
test_result_path
,
revision
=
self
.
_createTestResult
(
node_title
=
"Node0"
)
...
...
bt5/erp5_test_result/bt/revision
View file @
65b7c937
260
\ No newline at end of file
261
product/ERP5/Tool/TaskDistributionTool.py
View file @
65b7c937
...
...
@@ -102,7 +102,9 @@ class TaskDistributionTool(BaseTool):
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
]
for
test_name
in
test_name_list
:
# Sort tests by name to have consistent numbering of test result line on
# a test suite.
for
test_name
in
sorted
(
test_name_list
):
index
=
0
if
sorted_test_list
:
try
:
...
...
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