From 2c5e6f060a34fd4cc66918ca5153ee2f41383764 Mon Sep 17 00:00:00 2001 From: "phajdan.jr" Date: Fri, 21 Aug 2015 04:56:14 -0700 Subject: runtest.py: simplify xvfb logic; remove gyp flag checks BUG=506498 Review URL: https://codereview.chromium.org/1303853002 Cr-Commit-Position: refs/heads/master@{#344741} --- infra/scripts/legacy/scripts/slave/runtest.py | 9 +-------- infra/scripts/legacy/scripts/slave/slave_utils.py | 18 ------------------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/infra/scripts/legacy/scripts/slave/runtest.py b/infra/scripts/legacy/scripts/slave/runtest.py index cd6ad75..4e09d37 100755 --- a/infra/scripts/legacy/scripts/slave/runtest.py +++ b/infra/scripts/legacy/scripts/slave/runtest.py @@ -193,12 +193,6 @@ def _Main(options, args, extra_env): xvfb_path = os.path.join(os.path.dirname(sys.argv[0]), '..', '..', 'third_party', 'xvfb', platform.architecture()[0]) - special_xvfb_dir = None - fp_chromeos = options.factory_properties.get('chromeos', None) - if (fp_chromeos or - slave_utils.GypFlagIsOn(options, 'use_aura') or - slave_utils.GypFlagIsOn(options, 'chromeos')): - special_xvfb_dir = xvfb_path build_dir = os.path.normpath(os.path.abspath(options.build_dir)) bin_dir = os.path.join(build_dir, options.target) @@ -269,8 +263,7 @@ def _Main(options, args, extra_env): xvfb.StartVirtualX( slave_name, bin_dir, with_wm=(options.factory_properties.get('window_manager', 'True') == - 'True'), - server_dir=special_xvfb_dir) + 'True')) if _UsingGtestJson(options): json_file_name = log_processor.PrepareJSONFile( diff --git a/infra/scripts/legacy/scripts/slave/slave_utils.py b/infra/scripts/legacy/scripts/slave/slave_utils.py index 72a192d..3fe22f98 100644 --- a/infra/scripts/legacy/scripts/slave/slave_utils.py +++ b/infra/scripts/legacy/scripts/slave/slave_utils.py @@ -55,24 +55,6 @@ def SlaveBaseDir(chrome_dir): return result -def GypFlagIsOn(options, flag): - value = GetGypFlag(options, flag, False) - # The values we understand as Off are False and a text zero. - if value is False or value == '0': - return False - return True - - -def GetGypFlag(options, flag, default=None): - gclient = options.factory_properties.get('gclient_env', {}) - defines = gclient.get('GYP_DEFINES', '') - gypflags = dict([(a, c if b == '=' else True) for (a, b, c) in - [x.partition('=') for x in defines.split(' ')]]) - if flag not in gypflags: - return default - return gypflags[flag] - - def LogAndRemoveFiles(temp_dir, regex_pattern): """Removes files in |temp_dir| that match |regex_pattern|. This function prints out the name of each directory or filename before -- cgit v1.1