diff options
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 |