Commit f15b6980 authored by Benjamin Blanc's avatar Benjamin Blanc

Update

parent e99bc4ea
...@@ -49,12 +49,8 @@ class ScalabilityTestRunner(): ...@@ -49,12 +49,8 @@ class ScalabilityTestRunner():
self.testnode.working_directory, self.testnode.working_directory,
self.testnode.config, self.testnode.config,
self.testnode.log) self.testnode.log)
self.involved_nodes = [] # doesn't change during all the test # {'COMPX' : ['soft_path1.cfg', 'soft_path2.cfg'],
self.worker_nodes = [] # may change between two test_suite # 'COMPY' : ['soft_path1.cfg'], ... }
self.launcher_nodes = [] # may change between two test_suite
self.master_nodes = [] # doesn't change during all the test
self.slave_nodes = [] # doesn't change during all the test
self.remaining_software_installation_grid = {} self.remaining_software_installation_grid = {}
# Protection to prevent installation of softwares after checking # Protection to prevent installation of softwares after checking
self.still_supply_to_request = True self.still_supply_to_request = True
......
...@@ -323,7 +323,6 @@ branch = %(branch)s ...@@ -323,7 +323,6 @@ branch = %(branch)s
print config['server_url'] print config['server_url']
time.sleep(30) time.sleep(30)
try: try:
while True: while True:
try: try:
...@@ -338,32 +337,38 @@ branch = %(branch)s ...@@ -338,32 +337,38 @@ branch = %(branch)s
portal_url = config['test_suite_master_url'] portal_url = config['test_suite_master_url']
portal = taskdistribution.TaskDistributionTool(portal_url, logger=DummyLogger(log)) portal = taskdistribution.TaskDistributionTool(portal_url, logger=DummyLogger(log))
test_suite_portal = taskdistribution.TaskDistributor(portal_url, logger=DummyLogger(log)) test_suite_portal = taskdistribution.TaskDistributor(portal_url, logger=DummyLogger(log))
test_suite_json = test_suite_portal.startTestSuite(config['test_node_title']) test_suite_json = test_suite_portal.startTestSuite(config['test_node_title'])
test_suite_data = deunicodeData(json.loads(test_suite_json)) test_suite_data = deunicodeData(json.loads(test_suite_json))
log("Got following test suite data from master : %r" % \ log("Got following test suite data from master : %r" % \
(test_suite_data,)) (test_suite_data,))
##/BLOCK OK ##/BLOCK OK
if my_test_type == None:
# TODO : implement this method for each distributor
# (just UnitTestDistributor should be sufficient)
try:
my_test_type = portal.getTestType()
except:
log("testnode, error during requesting getTestType() method \
from the distributor.")
raise NotImplementedError
# Select the good runner
if my_type_test == None:
# Default way to determine if it is a slability or unit test
# Here parse/get information to
# if XXX : runner = UnitTe...
# elif YYY : runner = Scal...
# else : Raise ...
# But for the moment : # Select runner according to the test type
runner = UnitTestRunner(self)
# Used in testERP5TestNode
if my_type_test == 'UnitTest': if my_type_test == 'UnitTest':
runner = UnitTestRunner(self) runner = UnitTestRunner(self)
elif my_type_test == 'ScalabilityTest': elif my_type_test == 'ScalabilityTest':
runner = ScalabilityTestRunner(self) runner = ScalabilityTestRunner(self)
else: else:
log("testnode, Runner type '%s' not implemented.", %(my_type_test))
raise NotImplementedError raise NotImplementedError
# difference master/slave
# master get test_suites, slave get nothing
if len(test_suite_data) > 1:
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