Commit bbedf149 authored by Roque's avatar Roque

testnode: minor changes for scalability testing

- testnode saves in its config the repositories paths
- minor refactoring and cleanup

/reviewed-on nexedi/erp5!606
parent f8d308bb
...@@ -93,9 +93,11 @@ class TestNode(object): ...@@ -93,9 +93,11 @@ class TestNode(object):
software_config_path = None software_config_path = None
profile_content_list = [] profile_content_list = []
revision_dict = dict(node_test_suite.revision_list) revision_dict = dict(node_test_suite.revision_list)
self.config['repository_path_list'] = []
for vcs_repository in node_test_suite.vcs_repository_list: for vcs_repository in node_test_suite.vcs_repository_list:
buildout_section_id = vcs_repository.get('buildout_section_id') buildout_section_id = vcs_repository.get('buildout_section_id')
repository_path = vcs_repository['repository_path'] repository_path = vcs_repository['repository_path']
self.config['repository_path_list'].append(repository_path)
try: try:
profile_path = vcs_repository[PROFILE_PATH_KEY] profile_path = vcs_repository[PROFILE_PATH_KEY]
except KeyError: except KeyError:
...@@ -119,15 +121,9 @@ class TestNode(object): ...@@ -119,15 +121,9 @@ class TestNode(object):
node_test_suite.reference) node_test_suite.reference)
repository_path = os.path.relpath(repository_path, from_path) repository_path = os.path.relpath(repository_path, from_path)
# XXX: Like in run(), code depending on specific test type must be
# moved to the test type classes. In particular, the use of a
# replacement pattern ('<obfuscated_url>') is ugly: buildout
# has cleaner ways to do that.
if test_type=="ScalabilityTest": if test_type=="ScalabilityTest":
# <obfuscated_url> word is modified by in runner.prepareSlapOSForTestSuite()
profile_content_list.append(""" profile_content_list.append("""
[%(buildout_section_id)s] [%(buildout_section_id)s]
repository = <obfuscated_url>/%(buildout_section_id)s/%(buildout_section_id)s.git
revision = %(revision)s revision = %(revision)s
ignore-ssl-certificate = true ignore-ssl-certificate = true
develop = false develop = false
...@@ -264,7 +260,7 @@ shared = true ...@@ -264,7 +260,7 @@ shared = true
begin = time.time() begin = time.time()
taskdistributor = taskdistribution.TaskDistributor( taskdistributor = taskdistribution.TaskDistributor(
portal_url, logger=logger) portal_url, logger=logger)
self.test_suite_portal = taskdistributor # XXX ScalabilityTest self.taskdistribution = taskdistributor
node_configuration = taskdistributor.subscribeNode( node_configuration = taskdistributor.subscribeNode(
node_title=config['test_node_title'], node_title=config['test_node_title'],
computer_guid=config['computer_id']) computer_guid=config['computer_id'])
......
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