diff options
author | phajdan.jr <phajdan.jr@chromium.org> | 2015-07-06 06:58:57 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-06 13:59:32 +0000 |
commit | 0898e7229adfcafd8e327685083fc587ecd388d6 (patch) | |
tree | 1248a09c3cd91e7dbe127b2c65c118d768a30ab2 /infra/scripts | |
parent | c22bad7a92241c0731b965f6ab565693722b282d (diff) | |
download | chromium_src-0898e7229adfcafd8e327685083fc587ecd388d6.zip chromium_src-0898e7229adfcafd8e327685083fc587ecd388d6.tar.gz chromium_src-0898e7229adfcafd8e327685083fc587ecd388d6.tar.bz2 |
Reset PYTHONPATH in runtest_wrapper.py (try #2)
This ensures we won't use build-side python modules,
and that any changes in src-side modules do take effect.
This is a re-landing of https://codereview.chromium.org/1224593002
with a change to src/tools/telemetry/telemetry/TELEMETRY_DEPS .
BUG=506498
Review URL: https://codereview.chromium.org/1218953003
Cr-Commit-Position: refs/heads/master@{#337387}
Diffstat (limited to 'infra/scripts')
-rw-r--r-- | infra/scripts/legacy/site_config/config.py | 14 | ||||
-rwxr-xr-x | infra/scripts/runtest_wrapper.py | 9 |
2 files changed, 7 insertions, 16 deletions
diff --git a/infra/scripts/legacy/site_config/config.py b/infra/scripts/legacy/site_config/config.py index 7c9ba9a..0108e65 100644 --- a/infra/scripts/legacy/site_config/config.py +++ b/infra/scripts/legacy/site_config/config.py @@ -6,7 +6,6 @@ """ import os -from twisted.spread import banana # DatabaseSetup was moved. Import it for backward compatibility from common.chromium_utils import DatabaseSetup # pylint: disable=W0611 @@ -15,18 +14,5 @@ from config_bootstrap import Master # pylint: disable=W0403,W0611 SITE_CONFIG_PATH = os.path.abspath(os.path.dirname(__file__)) -# By default, the banana's string size limit is 640kb, which is unsufficient -# when passing diff's around. Raise it to 100megs. Do this here since the limit -# is enforced on both the server and the client so both need to raise the -# limit. -banana.SIZE_LIMIT = 100 * 1024 * 1024 - - def SiteConfigPath(): return SITE_CONFIG_PATH - - - - - - diff --git a/infra/scripts/runtest_wrapper.py b/infra/scripts/runtest_wrapper.py index 825a4ab..fe9835f 100755 --- a/infra/scripts/runtest_wrapper.py +++ b/infra/scripts/runtest_wrapper.py @@ -26,12 +26,17 @@ def main(argv): args = parser.parse_args(argv) env = copy.copy(os.environ) - pythonpath = env.get('PYTHONPATH', '').split(':') + # Reset PYTHONPATH to make sure we're not accidentally using + # the buildbot-provided value and build-side modules. That would make + # changes inside this directory not take effect on buildbot. + pythonpath = [] pythonpath.append(os.path.join( SRC_DIR, 'infra', 'scripts', 'legacy', 'scripts')) pythonpath.append(os.path.join( SRC_DIR, 'infra', 'scripts', 'legacy', 'site_config')) - env['PYTHONPATH'] = ':'.join(pythonpath) + pythonpath.append(os.path.join( + SRC_DIR, 'third_party')) + env['PYTHONPATH'] = os.pathsep.join(pythonpath) return subprocess.call([ sys.executable, |