Commit 13e6aac9 authored by Benjamin Blanc's avatar Benjamin Blanc

Add some changements to ScalabilityTestRunner

parent bbf60fe0
...@@ -49,37 +49,35 @@ class ScalabilityTestRunner(): ...@@ -49,37 +49,35 @@ class ScalabilityTestRunner():
self.worker_nodes = [] # may change between two test_suite self.worker_nodes = [] # may change between two test_suite
self.launcher_nodes = [] # may change between two test_suite self.launcher_nodes = [] # may change between two test_suite
self.master_nodes = [] # doesn't change during all the test self.master_nodes = [] # doesn't change during all the test
self.slave_nodes = [] # doesn't change during all the test self.slave_nodes = [] # doesn't change during all the test
def _prepareSlapOS(self, software_path_list): def _prepareSlapOS(*args, **kw):
""" """
Install softwares from list on all nodes wich are involved in the scalability test A proxy to _supply : Install software a software on a specific node
""" """
for computer_guid in self.computer_guid_list: self.slapos_controler._supply(*args, **kw)
self.slapos_controler.initializeSlapOSControler(
software_path_list,
computer_guid)
def prepareSlapOSForTestNode(self): def prepareSlapOSForTestNode(self):
""" """
Install softwares used to run tests (ex : launcher software) Install all softwares used to run tests (ex : launcher software)
""" """
for computer_guid in self.launcher_nodes['computer_id']: for software_path in self.config.get("software_list"):
self.slapos_controler._supply( for computer_guid in self.launcher_nodes['computer_id']:
software_path_list=self.config.get("software_list"), self._prepareSlapOS(software_path, computer_guid)
computer_guid = computer_guid
)
def prepareSlapOSForTestSuite(self, software_path_list): def _extractSoftwarePathList(self, node_test_suite):
# TODO : write code
return []
def prepareSlapOSForTestSuite(self, node_test_suite):
""" """
Install testsuite's softwares (on worker_nodes) Install all testsuite's softwares (on worker_nodes)
""" """
for computer_guid in self.worker_nodes['computer_id']: software_path_list = _extractSoftwarePathList(software_path_list)
self.slapos_controler._supply( for software_path in software_path_list:
software_path_list=software_path_list, for computer_guid in self.worker_nodes['computer_id']:
computer_guid = computer_guid self._prepareSlapOS(software_path,computer_guid)
)
def _cleanUpNodesInformation(self): def _cleanUpNodesInformation(self):
self.worker_nodes = [] self.worker_nodes = []
...@@ -93,5 +91,7 @@ class ScalabilityTestRunner(): ...@@ -93,5 +91,7 @@ class ScalabilityTestRunner():
# And if it's not end ans invalidate everything and retry/reloop # And if it's not end ans invalidate everything and retry/reloop
def runTestSuite(self, node_test_suite, portal_url, log=None):
# TODO : write code
pass
...@@ -336,9 +336,6 @@ branch = %(branch)s ...@@ -336,9 +336,6 @@ branch = %(branch)s
(test_suite_data,)) (test_suite_data,))
##/BLOCK OK ##/BLOCK OK
# Here we know what we are (sclability or unit test)
# self.prepareSlapOSForTestNode(test_node_slapos)
# Select the good runner # Select the good runner
if True : if True :
...@@ -385,15 +382,12 @@ branch = %(branch)s ...@@ -385,15 +382,12 @@ branch = %(branch)s
## /BLOCK OK ## /BLOCK OK
# Now prepare the installation of SlapOS and create instance # Now prepare the installation of SlapOS and create instance
# status_dict = self.prepareSlapOSForTestSuite(node_test_suite)
status_dict = runner.prepareSlapOSForTestSuite(node_test_suite) status_dict = runner.prepareSlapOSForTestSuite(node_test_suite)
# Give some time so computer partitions may start # Give some time so computer partitions may start
# as partitions can be of any kind we have and likely will never have # as partitions can be of any kind we have and likely will never have
# a reliable way to check if they are up or not ... # a reliable way to check if they are up or not ...
# time.sleep(20) # time.sleep(20)
# self.runTestSuite(node_test_suite,portal_url)
# For scalability test runTestSuite is a big part # For scalability test runTestSuite is a big part
runner.runTestSuite(node_test_suite,portal_url) runner.runTestSuite(node_test_suite,portal_url)
......
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