Commit df5ce7dd authored by Douglas's avatar Douglas Committed by Ivan Tyagov

Propagation frontend url from test node to the runTestSuite script

Now the test node sends a  `--frontend_url` parameter to the test suite, which an IPv4-enabled URL to the test node's backend. This is required to run remote tests on environments without IPv6 connectivity. 

Also the SlapOSController now waits 20 seconds instead of 10 seconds for the SlapOS proxy web server to start answering requests. On slower machines 10 seconds weren't being enough.

@Tyagov, please review.

/reviewed-on nexedi/erp5!189
parents f9c73b2a 10580522
...@@ -280,7 +280,7 @@ class SlapOSControler(object): ...@@ -280,7 +280,7 @@ class SlapOSControler(object):
process_manager.process_pid_set.add(proxy.pid) process_manager.process_pid_set.add(proxy.pid)
# XXX: dirty, giving some time for proxy to being able to accept # XXX: dirty, giving some time for proxy to being able to accept
# connections # connections
time.sleep(10) time.sleep(20)
try: try:
slap = slapos.slap.slap() slap = slapos.slap.slap()
self.slap = slap self.slap = slap
......
...@@ -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():
......
...@@ -133,7 +133,6 @@ class TestNode(object): ...@@ -133,7 +133,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