diff options
Diffstat (limited to 'chromium/testing')
-rw-r--r-- | chromium/testing/scripts/common.py | 10 | ||||
-rwxr-xr-x | chromium/testing/scripts/content_shell_crash_test.py | 11 | ||||
-rwxr-xr-x | chromium/testing/scripts/run_performance_tests.py | 13 | ||||
-rwxr-xr-x | chromium/testing/test_env.py | 19 |
4 files changed, 0 insertions, 53 deletions
diff --git a/chromium/testing/scripts/common.py b/chromium/testing/scripts/common.py index 6793c52da67..06a166648c8 100644 --- a/chromium/testing/scripts/common.py +++ b/chromium/testing/scripts/common.py @@ -24,12 +24,6 @@ import test_env if sys.platform.startswith('linux'): import xvfb -# Unfortunately we need to copy these variables from ../test_env.py. -# Importing it and using its get_sandbox_env breaks test runs on Linux -# (it seems to unset DISPLAY). -CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' -CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' - SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) SRC_DIR = os.path.abspath( @@ -461,10 +455,6 @@ class BaseIsolatedScriptArgsAdapter(object): env = os.environ.copy() - # Assume we want to set up the sandbox environment variables all the - # time; doing so is harmless on non-Linux platforms and is needed - # all the time on Linux. - env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH valid = True try: env['CHROME_HEADLESS'] = '1' diff --git a/chromium/testing/scripts/content_shell_crash_test.py b/chromium/testing/scripts/content_shell_crash_test.py index 6f0e9b3c06d..5dc46b2f743 100755 --- a/chromium/testing/scripts/content_shell_crash_test.py +++ b/chromium/testing/scripts/content_shell_crash_test.py @@ -16,13 +16,6 @@ import xvfb from scripts import common -# Unfortunately we need to copy these variables from ../test_env.py. -# Importing it and using its get_sandbox_env breaks test runs on Linux -# (it seems to unset DISPLAY). -CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' -CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' - - def main(argv): parser = argparse.ArgumentParser() parser.add_argument( @@ -43,10 +36,6 @@ def main(argv): args = parser.parse_args(argv) env = os.environ.copy() - # Assume we want to set up the sandbox environment variables all the - # time; doing so is harmless on non-Linux platforms and is needed - # all the time on Linux. - env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH additional_args = [] if args.platform == 'win32': diff --git a/chromium/testing/scripts/run_performance_tests.py b/chromium/testing/scripts/run_performance_tests.py index da1f07b935b..b6e7f03cea5 100755 --- a/chromium/testing/scripts/run_performance_tests.py +++ b/chromium/testing/scripts/run_performance_tests.py @@ -70,11 +70,6 @@ import xvfb import test_env from scripts import common -# Unfortunately we need to copy these variables from ../test_env.py. -# Importing it and using its get_sandbox_env breaks test runs on Linux -# (it seems to unset DISPLAY). -CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' -CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' SHARD_MAPS_DIRECTORY = os.path.abspath( os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir, 'tools', 'perf', 'core', 'shard_maps')) @@ -306,10 +301,6 @@ def execute_gtest_perf_test(command_generator, output_paths, use_xvfb=False, start = time.time() env = os.environ.copy() - # Assume we want to set up the sandbox environment variables all the - # time; doing so is harmless on non-Linux platforms and is needed - # all the time on Linux. - env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH env['CHROME_HEADLESS'] = '1' #TODO(crbug/1138988): Some gtests do not implements the unit_test_launcher.cc. # As a result, they will not respect the arguments added by @@ -512,10 +503,6 @@ def execute_telemetry_benchmark( env = os.environ.copy() env['CHROME_HEADLESS'] = '1' - # Assume we want to set up the sandbox environment variables all the - # time; doing so is harmless on non-Linux platforms and is needed - # all the time on Linux. - env[CHROME_SANDBOX_ENV] = CHROME_SANDBOX_PATH return_code = 1 temp_dir = tempfile.mkdtemp('telemetry') diff --git a/chromium/testing/test_env.py b/chromium/testing/test_env.py index 6abd1a44bca..7ed4a7dde7c 100755 --- a/chromium/testing/test_env.py +++ b/chromium/testing/test_env.py @@ -17,24 +17,6 @@ import time # This is hardcoded to be src/ relative to this script. ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -CHROME_SANDBOX_ENV = 'CHROME_DEVEL_SANDBOX' -CHROME_SANDBOX_PATH = '/opt/chromium/chrome_sandbox' - - -def get_sandbox_env(env): - """Returns the environment flags needed for the SUID sandbox to work.""" - extra_env = {} - chrome_sandbox_path = env.get(CHROME_SANDBOX_ENV, CHROME_SANDBOX_PATH) - # The above would silently disable the SUID sandbox if the env value were - # an empty string. We don't want to allow that. http://crbug.com/245376 - # TODO(jln): Remove this check once it's no longer possible to disable the - # sandbox that way. - if not chrome_sandbox_path: - chrome_sandbox_path = CHROME_SANDBOX_PATH - extra_env[CHROME_SANDBOX_ENV] = chrome_sandbox_path - - return extra_env - def trim_cmd(cmd): """Removes internal flags from cmd since they're just used to communicate from @@ -324,7 +306,6 @@ def run_executable(cmd, env, stdoutfile=None, cwd=None): # Used by base/base_paths_linux.cc as an override. Just make sure the default # logic is used. env.pop('CR_SOURCE_ROOT', None) - extra_env.update(get_sandbox_env(env)) # Copy logic from tools/build/scripts/slave/runtest.py. asan = '--asan=1' in cmd |