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

Unified Diff: tests/presubmit_unittest.py

Issue 6792060: Make more tests pass on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 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
« scm.py ('K') | « tests/local_rietveld.py ('k') | tests/scm_unittest.py » ('j') | 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 8b6a68c9eabcb83d5ffa0b68832627378b1c2cf2..f11fe22c49c4b6da7ac9041b05d8e39520dee9fe 100755
--- a/tests/presubmit_unittest.py
+++ b/tests/presubmit_unittest.py
@@ -2006,8 +2006,11 @@ mac|success|blew
input_api.PresubmitLocalPath().AndReturn(self.fake_root_dir)
input_api.subprocess.check_call(
['allo'], cwd=self.fake_root_dir)
+ cmd = ['bar.py']
+ if input_api.platform == 'win32':
+ cmd.insert(0, input_api.python_executable)
Dirk Pranke 2011/04/05 21:01:29 why not always use cmd = [ input_api.python_execut
input_api.subprocess.check_call(
- ['bar.py'], cwd=self.fake_root_dir).AndRaise(
+ cmd, cwd=self.fake_root_dir).AndRaise(
input_api.subprocess.CalledProcessError())
self.mox.ReplayAll()
@@ -2031,7 +2034,8 @@ mac|success|blew
input_api.os_listdir(path).AndReturn(['.', '..', 'a', 'b', 'c'])
input_api.os_path.isfile = lambda x: not x.endswith('.')
input_api.subprocess.check_call(
- ['random_directory/b'], cwd=self.fake_root_dir)
+ [presubmit.os.path.join('random_directory', 'b')],
+ cwd=self.fake_root_dir)
self.mox.ReplayAll()
results = presubmit_canned_checks.RunUnitTestsInDirectory(
@@ -2042,7 +2046,8 @@ mac|success|blew
blacklist=['a'],
verbose=True)
self.assertEqual(results, [])
- self.checkstdout('Running random_directory/b\n')
+ self.checkstdout(
+ 'Running %s\n' % presubmit.os.path.join('random_directory', 'b'))
if __name__ == '__main__':
« scm.py ('K') | « tests/local_rietveld.py ('k') | tests/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698