Chromium Code Reviews| Index: tests/gclient_smoketest.py |
| diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py |
| index c05bbf339de4f23118bb331f71976d199f1db9a0..5fc87d38492e5786318280fe16468dcf0c45c2db 100755 |
| --- a/tests/gclient_smoketest.py |
| +++ b/tests/gclient_smoketest.py |
| @@ -1343,6 +1343,76 @@ class GClientSmokeBoth(GClientSmokeBase): |
| self.assertEquals(sorted(entries), sorted(expected)) |
| + def testDeleteConflictingCheckout(self): |
| + if not self.enabled: |
| + return |
| + |
| + # Create an initial svn checkout. |
| + self.gclient(['config', '--spec', |
| + 'solutions=[' |
| + '{"name": "src",' |
| + ' "url": "' + self.svn_base + 'trunk/src"},' |
| + ']' |
| + ]) |
| + results = self.gclient(['sync', '--deps', 'mac']) |
| + self.assertEqual(results[2], 0, 'Sync failed!') |
| + |
| + # Verify that we have the expected svn checkout. |
| + results = self.gclient(['revinfo', '--deps', 'mac']) |
| + actual = sorted(results[0].splitlines()) |
| + expected = sorted([ |
|
iannucci
2013/11/13 06:26:30
not sure the sorted is necessary, since the prefix
borenet
2013/11/13 19:12:24
Done.
|
| + 'src: %strunk/src' % self.svn_base, |
| + 'src/other: %strunk/other' % self.svn_base, |
| + 'src/file/other: File("%strunk/other/DEPS")' % self.svn_base, |
| + 'src/third_party/foo: %strunk/third_party/foo@1' % self.svn_base, |
| + ]) |
| + self.assertEquals(actual, expected) |
| + |
| + # Change the desired checkout to git. |
| + self.gclient(['config', '--spec', |
| + 'solutions=[' |
| + '{"name": "src",' |
| + ' "url": "' + self.git_base + 'repo_1"},' |
| + ']' |
| + ]) |
| + |
| + # Verify that the sync succeeds. |
| + results = self.gclient(['sync', '--deps', 'mac']) |
| + self.assertEqual(results[2], 0, 'Sync failed!') |
| + |
| + # Verify that we got the desired git checkout. |
| + results = self.gclient(['revinfo', '--deps', 'mac']) |
| + actual = sorted(results[0].splitlines()) |
| + expected = sorted([ |
| + 'src: %srepo_1' % self.git_base, |
| + 'src/repo2: %srepo_2@%s' % (self.git_base, self.githash('repo_2', 1)[:7]), |
| + 'src/repo2/repo_renamed: %srepo_3' % self.git_base, |
| + ]) |
| + self.assertEquals(actual, expected) |
| + |
| + # Change the desired checkout back to svn. |
| + self.gclient(['config', '--spec', |
| + 'solutions=[' |
| + '{"name": "src",' |
| + ' "url": "' + self.svn_base + 'trunk/src"},' |
| + ']' |
| + ]) |
| + |
| + # Verify that the sync succeeds. |
| + results = self.gclient(['sync', '--deps', 'mac']) |
| + self.assertEqual(results[2], 0, 'Sync failed!') |
| + |
| + # Verify that we have the expected svn checkout. |
| + results = self.gclient(['revinfo', '--deps', 'mac']) |
| + actual = sorted(results[0].splitlines()) |
| + expected = sorted([ |
| + 'src: %strunk/src' % self.svn_base, |
| + 'src/other: %strunk/other' % self.svn_base, |
| + 'src/file/other: File("%strunk/other/DEPS")' % self.svn_base, |
| + 'src/third_party/foo: %strunk/third_party/foo@1' % self.svn_base, |
| + ]) |
| + self.assertEquals(actual, expected) |
| + |
| class GClientSmokeFromCheckout(GClientSmokeBase): |
| # WebKit abuses this. It has a .gclient and a DEPS from a checkout. |