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

Side by Side 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, 5 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 unified diff | Download patch
« no previous file with comments | « infra/scripts/legacy/site_config/config_default.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Wrapper for runtest.py, makes it possible to control src-side 6 """Wrapper for runtest.py, makes it possible to control src-side
7 which file gets used and test the changes on trybots before landing.""" 7 which file gets used and test the changes on trybots before landing."""
8 8
9 9
10 import argparse 10 import argparse
11 import copy
11 import os 12 import os
12 import subprocess 13 import subprocess
13 import sys 14 import sys
14 15
15 16
17 SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
18
19
16 def main(argv): 20 def main(argv):
17 parser = argparse.ArgumentParser() 21 parser = argparse.ArgumentParser()
22 # TODO(phajdan.jr): Remove after cleaning up build repo side.
18 parser.add_argument( 23 parser.add_argument(
19 '--path-build', required=True, help='Path to the build repo') 24 '--path-build', help='Path to the build repo')
20 parser.add_argument('args', nargs='*', help='Arguments to pass to runtest.py') 25 parser.add_argument('args', nargs='*', help='Arguments to pass to runtest.py')
21 args = parser.parse_args(argv) 26 args = parser.parse_args(argv)
27
28 env = copy.copy(os.environ)
29 pythonpath = env.get('PYTHONPATH', '').split(':')
30 pythonpath.append(os.path.join(
31 SRC_DIR, 'infra', 'scripts', 'legacy', 'scripts'))
32 pythonpath.append(os.path.join(
33 SRC_DIR, 'infra', 'scripts', 'legacy', 'site_config'))
34 env['PYTHONPATH'] = ':'.join(pythonpath)
35
22 return subprocess.call([ 36 return subprocess.call([
23 sys.executable, 37 sys.executable,
24 os.path.join(args.path_build, 'scripts', 'tools', 'runit.py'), 38 os.path.join(SRC_DIR, 'infra', 'scripts', 'legacy',
25 '--show-path', 39 'scripts', 'slave', 'runtest.py')
26 sys.executable, 40 ] + args.args, env=env)
27 os.path.join(args.path_build, 'scripts', 'slave', 'runtest.py')
28 ] + args.args)
29 41
30 42
31 if __name__ == '__main__': 43 if __name__ == '__main__':
32 sys.exit(main(sys.argv[1:])) 44 sys.exit(main(sys.argv[1:]))
OLDNEW
« 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