|
|
|
@ -13,6 +13,7 @@ from .util import (
|
|
|
|
|
find_python,
|
|
|
|
|
generate_pip_command,
|
|
|
|
|
get_docker_completion,
|
|
|
|
|
get_remote_completion,
|
|
|
|
|
ApplicationError,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -91,6 +92,12 @@ class EnvironmentConfig(CommonConfig):
|
|
|
|
|
self.inject_httptester = args.inject_httptester if 'inject_httptester' in args else False # type: bool
|
|
|
|
|
self.httptester = docker_qualify_image(args.httptester if 'httptester' in args else '') # type: str
|
|
|
|
|
|
|
|
|
|
if self.get_delegated_completion().get('httptester', 'enabled') == 'disabled':
|
|
|
|
|
self.httptester = False
|
|
|
|
|
|
|
|
|
|
if self.get_delegated_completion().get('pip-check', 'enabled') == 'disabled':
|
|
|
|
|
self.pip_check = False
|
|
|
|
|
|
|
|
|
|
if args.check_python and args.check_python != actual_major_minor:
|
|
|
|
|
raise ApplicationError('Running under Python %s instead of Python %s as expected.' % (actual_major_minor, args.check_python))
|
|
|
|
|
|
|
|
|
@ -117,6 +124,18 @@ class EnvironmentConfig(CommonConfig):
|
|
|
|
|
"""
|
|
|
|
|
return generate_pip_command(self.python_executable)
|
|
|
|
|
|
|
|
|
|
def get_delegated_completion(self):
|
|
|
|
|
"""Returns a dictionary of settings specific to the selected delegation system, if any. Otherwise returns an empty dictionary.
|
|
|
|
|
:rtype: dict[str, str]
|
|
|
|
|
"""
|
|
|
|
|
if self.docker:
|
|
|
|
|
return get_docker_completion().get(self.docker_raw, {})
|
|
|
|
|
|
|
|
|
|
if self.remote:
|
|
|
|
|
return get_remote_completion().get(self.remote, {})
|
|
|
|
|
|
|
|
|
|
return {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestConfig(EnvironmentConfig):
|
|
|
|
|
"""Configuration common to all test commands."""
|
|
|
|
@ -236,6 +255,9 @@ class IntegrationConfig(TestConfig):
|
|
|
|
|
self.no_temp_workdir = args.no_temp_workdir
|
|
|
|
|
self.no_temp_unicode = args.no_temp_unicode
|
|
|
|
|
|
|
|
|
|
if self.get_delegated_completion().get('temp-unicode', 'enabled') == 'disabled':
|
|
|
|
|
self.no_temp_unicode = True
|
|
|
|
|
|
|
|
|
|
if self.list_targets:
|
|
|
|
|
self.explain = True
|
|
|
|
|
|
|
|
|
|