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

Side by Side Diff: tests/scm_unittest.py

Issue 6627013: Correctly kill 'git daemon' child process, fixing a lot of testing issues. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fixed race condition 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 unified diff | Download patch | Annotate | Revision Log
« tests/fake_repos.py ('K') | « tests/gclient_smoketest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unit tests for scm.py.""" 6 """Unit tests for scm.py."""
7 7
8 # pylint: disable=E1101,W0403 8 # pylint: disable=E1101,W0403
9 9
10 # Fixes include path. 10 # Fixes include path.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 scm.SVN.Capture(['status', '--xml']).AndReturn(text) 238 scm.SVN.Capture(['status', '--xml']).AndReturn(text)
239 self.mox.ReplayAll() 239 self.mox.ReplayAll()
240 info = scm.SVN.CaptureStatus(None) 240 info = scm.SVN.CaptureStatus(None)
241 self.assertEquals(info, []) 241 self.assertEquals(info, [])
242 242
243 243
244 class RealSvnTest(fake_repos.FakeReposTestBase): 244 class RealSvnTest(fake_repos.FakeReposTestBase):
245 # Tests that work with a checkout. 245 # Tests that work with a checkout.
246 def setUp(self): 246 def setUp(self):
247 super(RealSvnTest, self).setUp() 247 super(RealSvnTest, self).setUp()
248 self.FAKE_REPOS.setUpSVN() 248 self.FAKE_REPOS.set_up_svn()
249 self.svn_root = scm.os.path.join(self.root_dir, 'base') 249 self.svn_root = scm.os.path.join(self.root_dir, 'base')
250 scm.SVN.Capture( 250 scm.SVN.Capture(
251 ['checkout', self.svn_base + 'trunk/third_party', 'base'], 251 ['checkout', self.svn_base + 'trunk/third_party', 'base'],
252 cwd=self.root_dir) 252 cwd=self.root_dir)
253 self.tree = self.mangle_svn_tree(('trunk/third_party@-1', ''),) 253 self.tree = self.mangle_svn_tree(('trunk/third_party@-1', ''),)
254 254
255 def _capture(self, cmd, **kwargs): 255 def _capture(self, cmd, **kwargs):
256 kwargs.setdefault('cwd', self.svn_root) 256 kwargs.setdefault('cwd', self.svn_root)
257 return scm.SVN.Capture(cmd, **kwargs) 257 return scm.SVN.Capture(cmd, **kwargs)
258 258
(...skipping 28 matching lines...) Expand all
287 self._capture(['update', '--revision', 'base']) 287 self._capture(['update', '--revision', 'base'])
288 288
289 self.assertTree(self.tree, self.svn_root) 289 self.assertTree(self.tree, self.svn_root)
290 290
291 291
292 if __name__ == '__main__': 292 if __name__ == '__main__':
293 import unittest 293 import unittest
294 unittest.main() 294 unittest.main()
295 295
296 # vim: ts=2:sw=2:tw=80:et: 296 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« tests/fake_repos.py ('K') | « tests/gclient_smoketest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698