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

Unified Diff: tests/fake_repos.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
Index: tests/fake_repos.py
diff --git a/tests/fake_repos.py b/tests/fake_repos.py
index 54ab154256af0390ed713178efcd73dfbe7cfcb4..2151703dd6413595116f8e1e4aef1ecda247d749 100755
--- a/tests/fake_repos.py
+++ b/tests/fake_repos.py
@@ -310,8 +310,7 @@ class FakeReposBase(object):
return True
try:
subprocess2.check_call(['svnadmin', 'create', self.svn_repo])
- except subprocess2.CalledProcessError, e:
- logging.debug('Failed with : %s' % e)
+ except (OSError, subprocess2.CalledProcessError):
return False
write(join(self.svn_repo, 'conf', 'svnserve.conf'),
'[general]\n'
@@ -352,9 +351,11 @@ class FakeReposBase(object):
self.set_up()
if self.gitdaemon:
return True
- if sys.platform == 'win32':
- return False
assert self.git_pid_file == None
+ try:
+ subprocess2.check_output(['git', '--version'])
+ except (OSError, subprocess2.CalledProcessError):
+ return False
for repo in ['repo_%d' % r for r in range(1, self.NB_GIT_REPOS + 1)]:
subprocess2.check_call(['git', 'init', '-q', join(self.git_root, repo)])
self.git_hashes[repo] = [None]

Powered by Google App Engine
This is Rietveld 408576698