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: |