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

Unified Diff: tests/scm_unittest.py

Issue 795723003: Fix test failures on Ubuntu/Trusty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years 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 | « tests/gclient_smoketest.py ('k') | tests/submodule-merge-test.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/scm_unittest.py
diff --git a/tests/scm_unittest.py b/tests/scm_unittest.py
index 69691a35938e158a412f04cea29590a3f67d2d2a..15676aa21644cc19a93abe055d66697ecbe64a40 100755
--- a/tests/scm_unittest.py
+++ b/tests/scm_unittest.py
@@ -475,60 +475,6 @@ class RealSvnTest(fake_repos.FakeReposTestBase):
self.assertTrue(scm.SVN.IsValidRevision(url_at_rev % 2))
self.assertTrue(scm.SVN.IsValidRevision(url_at_rev % 'HEAD'))
- def testRevert(self):
- if not self.enabled:
- return
- # Mess around and make sure revert works for all corner cases.
- # - svn add a file
- # - svn add a file and delete it
- # - Delete a file
- # - svn delete a file
- # - svn move a directory and svn rename files in it
- # - add a directory tree.
- def join(*args):
- return scm.os.path.join(self.svn_root, *args)
- self._capture(['move', 'foo', 'foo2'])
- self._capture(
- ['move',
- scm.os.path.join('foo2', 'origin'),
- scm.os.path.join('foo2', 'o')])
- scm.os.remove(join('origin'))
- self._capture(['propset', 'foo', 'bar', join('prout', 'origin')])
- fake_repos.gclient_utils.rmtree(join('prout'))
- with open(join('faa'), 'w') as f:
- f.write('eh')
- with open(join('faala'), 'w') as f:
- f.write('oh')
- self._capture(['add', join('faala')])
- added_and_removed = join('added_and_removed')
- with open(added_and_removed, 'w') as f:
- f.write('oh')
- self._capture(['add', added_and_removed])
- scm.os.remove(added_and_removed)
- # Make sure a tree of directories can be removed.
- scm.os.makedirs(join('new_dir', 'subdir'))
- with open(join('new_dir', 'subdir', 'newfile'), 'w') as f:
- f.write('ah!')
- self._capture(['add', join('new_dir')])
- self._capture(['add', join('new_dir', 'subdir')])
- self._capture(['add', join('new_dir', 'subdir', 'newfile')])
- # A random file in an added directory confuses svn.
- scm.os.makedirs(join('new_dir2', 'subdir'))
- with open(join('new_dir2', 'subdir', 'newfile'), 'w') as f:
- f.write('ah!')
- self._capture(['add', join('new_dir2')])
- self._capture(['add', join('new_dir2', 'subdir')])
- self._capture(['add', join('new_dir2', 'subdir', 'newfile')])
- with open(join('new_dir2', 'subdir', 'unversionedfile'), 'w') as f:
- f.write('unadded file!')
-
- scm.SVN.Revert(self.svn_root)
- self._capture(['update', '--revision', 'base'])
-
- self.assertTree(self.tree, self.svn_root)
- # Asserting the tree is not sufficient, svn status must come out clear too.
- self.assertEquals('', self._capture(['status']))
-
if __name__ == '__main__':
if '-v' in sys.argv:
« no previous file with comments | « tests/gclient_smoketest.py ('k') | tests/submodule-merge-test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698