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

Unified Diff: tests/presubmit_unittest.py

Issue 6459010: Improve presubmit_support.py handling of git checkout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 10 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 | « presubmit_support.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/presubmit_unittest.py
diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py
index bfffb5b3bb651f489f6a54f582ec39e5b21acc05..d8f186b5cd3e75e510db31fcaa71ed22f1d3a30a 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -596,11 +596,14 @@ def CheckChangeOnCommit(input_api, output_api):
self.UnMock(presubmit.os.path, 'exists')
self.mox.StubOutWithMock(presubmit, 'DoPresubmitChecks')
self.mox.StubOutWithMock(presubmit, 'ParseFiles')
- presubmit.os.path.isdir(presubmit.os.path.join(self.fake_root_dir, '.git')
- ).AndReturn(False)
presubmit.os.path.isdir(presubmit.os.path.join(self.fake_root_dir, '.svn')
).AndReturn(False)
- #presubmit.ParseFiles([], None).AndReturn([])
+ presubmit.os.path.isdir(presubmit.os.path.join(self.fake_root_dir, '.git')
+ ).AndReturn(False)
+ presubmit.subprocess.call(
+ ['git', 'rev-parse', '--show-cdup'],
+ cwd=self.fake_root_dir,
+ stdout=presubmit.subprocess.PIPE).AndReturn(1)
presubmit.DoPresubmitChecks(mox.IgnoreArg(), False, False,
mox.IgnoreArg(),
mox.IgnoreArg(),
« no previous file with comments | « presubmit_support.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698