Commit 2189d076 authored by Jérome Perrin's avatar Jérome Perrin

testnode: support firefox & xvfb installed in testnode

parent f51cf068
......@@ -122,7 +122,6 @@ class UnitTestRunner():
def runTestSuite(self, node_test_suite, portal_url, log=None):
config = self.testnode.config
parameter_list = []
slapos_controler = self._getSlapOSControler(self.testnode.working_directory)
run_test_suite_path_list = sorted(glob.glob("%s/*/bin/runTestSuite" % \
slapos_controler.instance_root))
......@@ -140,18 +139,20 @@ class UnitTestRunner():
'--master_url', portal_url])
firefox_bin_list = glob.glob("%s/soft/*/parts/firefox/firefox-slapos" % \
config["slapos_directory"])
if len(firefox_bin_list):
parameter_list.append('--firefox_bin')
if self.testnode.config.get('firefox_binary'):
firefox_bin_list = self.testnode.config['firefox_binary'],
xvfb_bin_list = glob.glob("%s/soft/*/parts/xserver/bin/Xvfb" % \
config["slapos_directory"])
if len(xvfb_bin_list):
parameter_list.append('--xvfb_bin')
if self.testnode.config.get('xvfb_binary'):
xvfb_bin_list = self.testnode.config['xvfb_binary'],
supported_paramater_set = self.testnode.process_manager.getSupportedParameterSet(
run_test_suite_path, parameter_list)
if '--firefox_bin' in supported_paramater_set:
run_test_suite_path, ['--firefox_bin', '--xvfb_bin'])
if firefox_bin_list and '--firefox_bin' in supported_paramater_set:
invocation_list.extend(["--firefox_bin", firefox_bin_list[0]])
if '--xvfb_bin' in supported_paramater_set:
if xvfb_bin_list and '--xvfb_bin' in supported_paramater_set:
invocation_list.extend(["--xvfb_bin", xvfb_bin_list[0]])
# TODO : include testnode correction ( b111682f14890bf )
if hasattr(node_test_suite,'additional_bt5_repository_id'):
additional_bt5_path = os.path.join(
......
......@@ -75,8 +75,8 @@ def main(*args):
config.readfp(parsed_argument.configuration_file[0])
for key in ('slapos_directory','working_directory','test_suite_directory',
'log_directory','run_directory', 'srv_directory', 'proxy_host',
'software_directory',
'proxy_port', 'git_binary','zip_binary','node_quantity',
'software_directory', 'proxy_port', 'git_binary','zip_binary',
'firefox_binary', 'xvfb_binary', 'node_quantity',
'test_node_title', 'ipv4_address','ipv6_address','test_suite_master_url',
'slapos_binary', 'httpd_ip', 'httpd_port', 'httpd_software_access_port',
'computer_id', 'server_url', 'software_link'):
......
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