From ad69f9c86b950cc84ca103e65824b9c9129d3999 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 31 Jan 2022 18:06:13 +0100 Subject: add support for testing with other browsers (especially Abrowser and Librewolf) There are still some spurious failures when running under those newer browsers. Those will be systematically investigated and fixed. --- test/misc_constants.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/misc_constants.py') diff --git a/test/misc_constants.py b/test/misc_constants.py index db9f3f1..51602b3 100644 --- a/test/misc_constants.py +++ b/test/misc_constants.py @@ -27,6 +27,7 @@ Miscellaneous data that were found useful # file's license. Although I request that you do not make use of this code # in a proprietary program, I am not going to enforce this in court. +import re from pathlib import Path here = Path(__file__).resolve().parent @@ -36,10 +37,13 @@ awk_script_name = 'compute_scripts.awk' unit_test_defines = ['-D', 'MOZILLA', '-D', 'MV2', '-D', 'TEST', '-D', 'UNIT_TEST', '-D', 'DEBUG'] -default_firefox_binary = '/usr/lib/icecat/icecat' -# The browser might be loading some globally-installed add-ons by default. They -# could interfere with the tests, so we'll disable all of them. -default_clean_profile_dir = here / 'default_profile' / 'icecat_empty' +conf_line_regex = re.compile(r'^([^=]+)=(.*)$') +conf_settings = {} +with open(here.parent / 'record.conf', 'rt') as conf: + for line in conf.readlines(): + match = conf_line_regex.match(line) + if match: + conf_settings[match.group(1).strip()] = match.group(2).strip() default_proxy_host = '127.0.0.1' default_proxy_port = 1337 -- cgit v1.2.3