Commit d814b8da authored by Benjamin Blanc's avatar Benjamin Blanc

Add isValidatedMaster to taskdistribution (client side)

parent f2afe20f
...@@ -469,6 +469,13 @@ class TaskDistributor(RPCRetry): ...@@ -469,6 +469,13 @@ class TaskDistributor(RPCRetry):
self._retryRPC('generateConfiguration', (test_suite_title,)) 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): class DummyTaskDistributionTool(object):
""" """
Fake remote server. Fake remote server.
......
...@@ -78,13 +78,16 @@ class ScalabilityTestRunner(): ...@@ -78,13 +78,16 @@ class ScalabilityTestRunner():
""" """
We will build slapos software needed by the testnode itself, We will build slapos software needed by the testnode itself,
""" """
software_path_list = [] if self.portal_test_suite.isValidatedMaster(self.config['test_node_title']):
software_path_list.append(self.testnode.config.get("software_list")) software_path_list = []
for software_path in software_path_list: software_path_list.append(self.testnode.config.get("software_list"))
for launcher_node in self.launcher_nodes: for software_path in software_path_list:
self._prepareSlapOS(software_path, launcher_node['computer_id']) for launcher_node in self.launcher_nodes:
# TODO : change the line below self._prepareSlapOS(software_path, launcher_node['computer_id'])
return {'status_code' : 0} # TODO : change the line below
return {'status_code' : 0}
else:
return {'status_code' : 0}
def prepareSlapOSForTestSuite(self, node_test_suite): def prepareSlapOSForTestSuite(self, node_test_suite):
""" """
......
...@@ -358,12 +358,10 @@ from the distributor.") ...@@ -358,12 +358,10 @@ from the distributor.")
raise NotImplementedError raise NotImplementedError
log("Type of current test is %s" %(my_test_type,)) log("Type of current test is %s" %(my_test_type,))
# master gets test_suites, slaves get nothing # master gets test_suites, slaves get nothing
if (len(test_suite_data) > 1) or (my_test_type == 'UnitTest'): runner.prepareSlapOSForTestNode(test_node_slapos)
runner.prepareSlapOSForTestNode(test_node_slapos) #Clean-up test suites
#Clean-up test suites self.checkOldTestSuite(test_suite_data)
self.checkOldTestSuite(test_suite_data)
for test_suite in test_suite_data: for test_suite in test_suite_data:
## BLOCK OK ## BLOCK OK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment