Commit 10580522 authored by Douglas's avatar Douglas Committed by Douglas

testnode: reading frontend url from config and sending to runTestSuite

Using this whenever a test suite is ran inside a test node it will know
the test node's IPv4 address.
parent 532eb285
...@@ -147,7 +147,8 @@ class UnitTestRunner(): ...@@ -147,7 +147,8 @@ class UnitTestRunner():
'--revision', node_test_suite.revision, '--revision', node_test_suite.revision,
'--test_suite_title', node_test_suite.test_suite_title, '--test_suite_title', node_test_suite.test_suite_title,
'--node_quantity', config['node_quantity'], '--node_quantity', config['node_quantity'],
'--master_url', portal_url]) '--master_url', portal_url,
'--frontend_url', slapos_controler.config['frontend_url']])
firefox_bin_list = glob.glob("%s/soft/*/parts/firefox/firefox-slapos" % \ firefox_bin_list = glob.glob("%s/soft/*/parts/firefox/firefox-slapos" % \
config["slapos_directory"]) config["slapos_directory"])
if len(firefox_bin_list): if len(firefox_bin_list):
......
...@@ -92,6 +92,7 @@ def main(*args): ...@@ -92,6 +92,7 @@ def main(*args):
CONFIG['httpd_url'] = 'https://[%s]:%s' % (CONFIG['httpd_ip'], CONFIG['httpd_url'] = 'https://[%s]:%s' % (CONFIG['httpd_ip'],
CONFIG['httpd_port']) CONFIG['httpd_port'])
CONFIG['system_temp_folder'] = "/tmp" CONFIG['system_temp_folder'] = "/tmp"
CONFIG['frontend_url'] = config.get('testnode', 'frontend_url')
# generate vcs_repository_list # generate vcs_repository_list
if 'bot_environment' in config.sections(): if 'bot_environment' in config.sections():
......
...@@ -132,7 +132,6 @@ class TestNode(object): ...@@ -132,7 +132,6 @@ class TestNode(object):
node_test_suite.reference) node_test_suite.reference)
software_config_path = os.path.relpath(software_config_path, from_path) software_config_path = os.path.relpath(software_config_path, from_path)
profile_content_list.append(""" profile_content_list.append("""
[buildout] [buildout]
extends = %(software_config_path)s extends = %(software_config_path)s
......
...@@ -289,6 +289,9 @@ def runTestSuite(): ...@@ -289,6 +289,9 @@ def runTestSuite():
parser.add_argument('--master_url', parser.add_argument('--master_url',
help='The Url of Master controling many suites', help='The Url of Master controling many suites',
default=None) default=None)
parser.add_argument('--frontend_url',
help='The url of the frontend of this test node',
default=None)
parser.add_argument('--source_code_path_list', parser.add_argument('--source_code_path_list',
help='List of Eggs folders to test, splited by commam', help='List of Eggs folders to test, splited by commam',
default='.') default='.')
......
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