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,6 +78,7 @@ class ScalabilityTestRunner(): ...@@ -78,6 +78,7 @@ class ScalabilityTestRunner():
""" """
We will build slapos software needed by the testnode itself, We will build slapos software needed by the testnode itself,
""" """
if self.portal_test_suite.isValidatedMaster(self.config['test_node_title']):
software_path_list = [] software_path_list = []
software_path_list.append(self.testnode.config.get("software_list")) software_path_list.append(self.testnode.config.get("software_list"))
for software_path in software_path_list: for software_path in software_path_list:
...@@ -85,6 +86,8 @@ class ScalabilityTestRunner(): ...@@ -85,6 +86,8 @@ class ScalabilityTestRunner():
self._prepareSlapOS(software_path, launcher_node['computer_id']) self._prepareSlapOS(software_path, launcher_node['computer_id'])
# TODO : change the line below # TODO : change the line below
return {'status_code' : 0} return {'status_code' : 0}
else:
return {'status_code' : 0}
def prepareSlapOSForTestSuite(self, node_test_suite): def prepareSlapOSForTestSuite(self, node_test_suite):
""" """
......
...@@ -358,9 +358,7 @@ from the distributor.") ...@@ -358,9 +358,7 @@ 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)
......
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