Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: infra/scripts/runtest_wrapper.py

Issue 1213433006: Fork runtest.py and everything it needs src-side for easier hacking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: runisolatedtest.py Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/scripts/legacy/site_config/config_default.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/scripts/runtest_wrapper.py
diff --git a/infra/scripts/runtest_wrapper.py b/infra/scripts/runtest_wrapper.py
index 1311c64dcc9e9a33afdac1a7a2e3194ab2ecfa91..825a4aba31248d4b41e41e710f5adc9648b4b4a5 100755
--- a/infra/scripts/runtest_wrapper.py
+++ b/infra/scripts/runtest_wrapper.py
@@ -8,24 +8,36 @@ which file gets used and test the changes on trybots before landing."""
import argparse
+import copy
import os
import subprocess
import sys
+SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
+
+
def main(argv):
parser = argparse.ArgumentParser()
+ # TODO(phajdan.jr): Remove after cleaning up build repo side.
parser.add_argument(
- '--path-build', required=True, help='Path to the build repo')
+ '--path-build', help='Path to the build repo')
parser.add_argument('args', nargs='*', help='Arguments to pass to runtest.py')
args = parser.parse_args(argv)
+
+ env = copy.copy(os.environ)
+ pythonpath = env.get('PYTHONPATH', '').split(':')
+ 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)
+
return subprocess.call([
sys.executable,
- os.path.join(args.path_build, 'scripts', 'tools', 'runit.py'),
- '--show-path',
- sys.executable,
- os.path.join(args.path_build, 'scripts', 'slave', 'runtest.py')
- ] + args.args)
+ os.path.join(SRC_DIR, 'infra', 'scripts', 'legacy',
+ 'scripts', 'slave', 'runtest.py')
+ ] + args.args, env=env)
if __name__ == '__main__':
« no previous file with comments | « infra/scripts/legacy/site_config/config_default.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698