Revision ee0a4a93
Added by koszko over 1 year ago
| test/haketilo_test/__main__.py | ||
|---|---|---|
| 40 | 40 |
|
| 41 | 41 |
def fail(msg, error_code): |
| 42 | 42 |
print('Error:', msg)
|
| 43 |
print('Usage:', sys.argv[0], '[--load-haketilo]', '[certificates_directory] [proxy_port]')
|
|
| 43 |
print('Usage:', sys.argv[0], '[--load-haketilo]', '[certificates_directory]')
|
|
| 44 | 44 |
sys.exit(error_code) |
| 45 | 45 |
|
| 46 | 46 |
load_haketilo = False |
| ... | ... | |
| 55 | 55 |
if not certdir.is_dir(): |
| 56 | 56 |
fail('selected certificate directory does not exist.', 2)
|
| 57 | 57 |
|
| 58 |
argv_idx += 1 |
|
| 59 |
|
|
| 60 |
port = sys.argv[argv_idx] if len(sys.argv) > argv_idx \ |
|
| 61 |
else str(default_proxy_port) |
|
| 62 |
|
|
| 63 |
if not port.isnumeric(): |
|
| 64 |
fail('port must be an integer.', 3)
|
|
| 65 |
|
|
| 66 |
httpd = do_an_internet(certdir, int(port)) |
|
| 67 |
driver = firefox_safe_mode(proxy_port=int(port)) |
|
| 58 |
httpd = do_an_internet(certdir) |
|
| 59 |
driver = firefox_safe_mode(proxy_port=httpd.server_port) |
|
| 68 | 60 |
|
| 69 | 61 |
if load_haketilo: |
| 70 | 62 |
driver.install_addon(str(Path.cwd() / 'mozilla-build.zip'), temporary=True) |
Also available in: Unified diff
automatically pick up a free port to run the HTTP proxy on
It is now possible to run multiple
make testcommands in parallel (e.g. testing abrowser and librewolf simultaneously after runningconfigurefor each of them in 2 different directories).