diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-01-31 18:06:13 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-01-31 18:06:13 +0100 |
commit | ad69f9c86b950cc84ca103e65824b9c9129d3999 (patch) | |
tree | a4314c8a5031b9fb2a278021b2388b86190c2823 /test/misc_constants.py | |
parent | 4c6a2323d90e9321ec2b78e226167b3013ea69ab (diff) | |
download | browser-extension-ad69f9c86b950cc84ca103e65824b9c9129d3999.tar.gz browser-extension-ad69f9c86b950cc84ca103e65824b9c9129d3999.zip |
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.
Diffstat (limited to 'test/misc_constants.py')
-rw-r--r-- | test/misc_constants.py | 12 |
1 files changed, 8 insertions, 4 deletions
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 |