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

Unified Diff: PRESUBMIT.py

Issue 17763004: Fixes depot_tools presubmit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: CQ is using the wrong copy of presubmit to run tests, fix for that. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index a8e90f3542f6d860156c44f9c0bc071540864645..a1ce99b87f6a4a1d4d51c7f2aaeed25929cec2a9 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -54,12 +54,15 @@ def RunGitClTests(input_api, output_api):
old_sys_path = sys.path
try:
sys.path = [input_api.PresubmitLocalPath()] + sys.path
+ print input_api.PresubmitLocalPath()
Dirk Pranke 2013/06/26 01:18:44 I don't think you actually want this print stateme
Ryan Tseng 2013/06/26 01:29:06 Oops, fixed.
from testing_support import local_rietveld
server = local_rietveld.LocalRietveld()
finally:
sys.path = old_sys_path
results = []
+ input_api.environ['PATH'] = '%s:%s' % (input_api.PresubmitLocalPath(),
iannucci 2013/06/26 01:18:23 use os.pathsep instead of ':'
Ryan Tseng 2013/06/26 01:29:06 Done.
+ input_api.environ['PATH'])
try:
# Start a local rietveld instance to test against.
server.start_server()
@@ -77,11 +80,12 @@ def RunGitClTests(input_api, output_api):
try:
if input_api.verbose:
input_api.subprocess.check_call(
- [input_api.os_path.join(test_path, test)], cwd=test_path)
+ [input_api.os_path.join(test_path, test)], cwd=test_path,
+ env=input_api.environ)
else:
input_api.subprocess.check_output(
[input_api.os_path.join(test_path, test)], cwd=test_path,
- stderr=input_api.subprocess.STDOUT)
+ stderr=input_api.subprocess.STDOUT, env=input_api.environ)
except (OSError, input_api.subprocess.CalledProcessError), e:
results.append(output_api.PresubmitError('%s failed\n%s' % (test, e)))
except local_rietveld.Failure, e:
« no previous file with comments | « no previous file | git_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698