Chromium Code Reviews| Index: tests/gclient_smoketest.py |
| diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py |
| index 481492cf71b5c30d3fff9eb563221876a7ea51ee..e2d065a07c78d81a7be6f9ee571ca71fc504467a 100755 |
| --- a/tests/gclient_smoketest.py |
| +++ b/tests/gclient_smoketest.py |
| @@ -21,6 +21,8 @@ ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| sys.path.insert(0, ROOT_DIR) |
| from testing_support.fake_repos import join, write, FakeReposTestBase |
| +import gclient_utils |
| +import scm |
| import subprocess2 |
| @@ -784,6 +786,20 @@ class GClientSmokeSVN(GClientSmokeBase): |
| self.checkBlock(res[0], |
| ['running', 'running', 'running']) |
| + def testUnversionedRepository(self): |
| + # Check that gclient automatically deletes crippled SVN repositories. |
| + if not self.enabled: |
| + return |
| + self.gclient(['config', self.svn_base + 'trunk/src/']) |
| + cmd = ['sync', '--jobs', '1', '--delete_unversioned_trees', '--reset'] |
| + self.assertEquals(0, self.gclient(cmd)[-1]) |
| + third_party = join(self.root_dir, 'src', 'third_party') |
| + scm.SVN.Capture(['propset', 'svn:ignore', 'foo', '.'], cwd=third_party) |
|
M-A Ruel
2012/11/14 20:59:29
I'd say to just subprocess it to avoid having to i
davidjames
2012/11/14 21:48:22
Done.
|
| + |
| + # Cripple src/third_party/foo and make sure gclient still succeeds. |
| + gclient_utils.rmtree(join(third_party, 'foo', '.svn')) |
| + self.assertEquals(0, self.gclient(cmd)[-1]) |
| + |
| class GClientSmokeGIT(GClientSmokeBase): |
| def setUp(self): |
| @@ -1176,8 +1192,8 @@ class GClientSmokeBoth(GClientSmokeBase): |
| ('git', 'repo_3', 'src/repo2/repo_renamed'), |
| ('svn', 'trunk/third_party/foo@1', 'src/third_party/foo'), |
| ] |
| - expected = [(scm, bases[scm] + url, os.path.join(self.root_dir, path)) |
| - for (scm, url, path) in expected_source] |
| + expected = [(scm_, bases[scm_] + url, os.path.join(self.root_dir, path)) |
| + for (scm_, url, path) in expected_source] |
| self.assertEquals(sorted(entries), sorted(expected)) |