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
alecs_myu
erp5
Commits
d814b8da
Commit
d814b8da
authored
Jun 11, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add isValidatedMaster to taskdistribution (client side)
parent
f2afe20f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
12 deletions
+20
-12
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+7
-0
erp5/util/testnode/ScalabilityTestRunner.py
erp5/util/testnode/ScalabilityTestRunner.py
+10
-7
erp5/util/testnode/testnode.py
erp5/util/testnode/testnode.py
+3
-5
No files found.
erp5/util/taskdistribution/__init__.py
View file @
d814b8da
...
...
@@ -469,6 +469,13 @@ class TaskDistributor(RPCRetry):
self
.
_retryRPC
(
'generateConfiguration'
,
(
test_suite_title
,))
def
isValidatedMaster
(
self
,
test_node_title
):
"""
Returns True or False if the testnode is the master
"""
self
.
_retryRPC
(
'isValidatedMaster'
,
(
test_node_title
,))
class
DummyTaskDistributionTool
(
object
):
"""
Fake remote server.
...
...
erp5/util/testnode/ScalabilityTestRunner.py
View file @
d814b8da
...
...
@@ -78,13 +78,16 @@ class ScalabilityTestRunner():
"""
We will build slapos software needed by the testnode itself,
"""
software_path_list
=
[]
software_path_list
.
append
(
self
.
testnode
.
config
.
get
(
"software_list"
))
for
software_path
in
software_path_list
:
for
launcher_node
in
self
.
launcher_nodes
:
self
.
_prepareSlapOS
(
software_path
,
launcher_node
[
'computer_id'
])
# TODO : change the line below
return
{
'status_code'
:
0
}
if
self
.
portal_test_suite
.
isValidatedMaster
(
self
.
config
[
'test_node_title'
]):
software_path_list
=
[]
software_path_list
.
append
(
self
.
testnode
.
config
.
get
(
"software_list"
))
for
software_path
in
software_path_list
:
for
launcher_node
in
self
.
launcher_nodes
:
self
.
_prepareSlapOS
(
software_path
,
launcher_node
[
'computer_id'
])
# TODO : change the line below
return
{
'status_code'
:
0
}
else
:
return
{
'status_code'
:
0
}
def
prepareSlapOSForTestSuite
(
self
,
node_test_suite
):
"""
...
...
erp5/util/testnode/testnode.py
View file @
d814b8da
...
...
@@ -358,12 +358,10 @@ from the distributor.")
raise
NotImplementedError
log
(
"Type of current test is %s"
%
(
my_test_type
,))
# master gets test_suites, slaves get nothing
if
(
len
(
test_suite_data
)
>
1
)
or
(
my_test_type
==
'UnitTest'
):
runner
.
prepareSlapOSForTestNode
(
test_node_slapos
)
#Clean-up test suites
self
.
checkOldTestSuite
(
test_suite_data
)
runner
.
prepareSlapOSForTestNode
(
test_node_slapos
)
#Clean-up test suites
self
.
checkOldTestSuite
(
test_suite_data
)
for
test_suite
in
test_suite_data
:
## BLOCK OK
...
...
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