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

Unified Diff: tests/bot_update_coverage_test.py

Issue 2492963002: bot_update: Use 'gclient' from same repository. (Closed)
Patch Set: Also don't ignore move errors in git cache. Created 4 years, 1 month 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 | « recipe_modules/bot_update/resources/bot_update.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/bot_update_coverage_test.py
diff --git a/tests/bot_update_coverage_test.py b/tests/bot_update_coverage_test.py
index f808c633ad7eab194f20e645d67a3bc0bd36e865..07814542e1cd1451e4232bf81016d1d717e1d644 100755
--- a/tests/bot_update_coverage_test.py
+++ b/tests/bot_update_coverage_test.py
@@ -167,7 +167,9 @@ class BotUpdateUnittests(unittest.TestCase):
self.filesystem = FakeFilesystem()
self.call = MockedCall(self.filesystem)
self.gclient = MockedGclientSync(self.filesystem)
- self.call.expect(('gclient', 'sync')).returns(self.gclient)
+ self.call.expect(
+ (sys.executable, '-u', bot_update.GCLIENT_PATH, 'sync')
+ ).returns(self.gclient)
self.old_call = getattr(bot_update, 'call')
self.params = copy.deepcopy(DEFAULT_PARAMS)
setattr(bot_update, 'call', self.call)
@@ -188,7 +190,9 @@ class BotUpdateUnittests(unittest.TestCase):
def overrideSetupForWindows(self):
sys.platform = 'win'
- self.call.expect(('gclient.bat', 'sync')).returns(self.gclient)
+ self.call.expect(
+ (sys.executable, '-u', bot_update.GCLIENT_PATH, 'sync')
+ ).returns(self.gclient)
def testBasic(self):
bot_update.ensure_checkout(**self.params)
@@ -205,7 +209,7 @@ class BotUpdateUnittests(unittest.TestCase):
gclient_sync_cmd = None
for record in self.call.records:
args = record[0]
- if args[0] == 'gclient.bat' and args[1] == 'sync':
+ if args[:4] == (sys.executable, '-u', bot_update.GCLIENT_PATH, 'sync'):
gclient_sync_cmd = args
self.assertTrue('--break_repo_locks' in gclient_sync_cmd)
« no previous file with comments | « recipe_modules/bot_update/resources/bot_update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698