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

Side by Side Diff: scripts/tools/runit.py

Issue 17635005: Make blink_trybot recipe work on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix presubmit + move polyfill (retry) Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import sys
6 import os
7 import subprocess
8
9 SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
10 BUILD = os.path.abspath(os.path.join(SCRIPT_DIR, '..', '..'))
11
12 def main(argv):
13 path = os.environ.get('PYTHONPATH', '')
14 path = path.split(':')
15 def add(new_path):
16 if new_path not in path:
17 path.append(new_path)
18
19 third_party = os.path.join(BUILD, 'third_party')
20 for d in os.listdir(third_party):
21 full = os.path.join(third_party, d)
22 if os.path.isdir(full):
23 add(full)
24 add(os.path.join(BUILD, 'scripts'))
25 add(third_party)
26 add(os.path.join(BUILD, 'site_config'))
27 add(os.path.join(BUILD, '..', 'build_internal', 'site_config'))
28 add('.')
29 os.environ['PYTHONPATH'] = os.pathsep.join(path)
30 print 'Set PYTHONPATH: %s' % os.environ['PYTHONPATH']
31
32 # Use subprocess instead of execv because otherwise windows destroys quoting.
33 p = subprocess.Popen(argv[1:])
34 p.wait()
35 return p.returncode
36
37
38 if __name__ == '__main__':
39 sys.exit(main(sys.argv))
OLDNEW
« scripts/slave/recipe_modules/gclient/api.py ('K') | « scripts/tools/run_recipe.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698