| Index: tests/gclient_smoketest.py
|
| diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py
|
| index 8c9a414d5dc2f47c6ae7122e1356b260b3f3eb04..645f7c52d4c652be355c3a8edbc4f28928ea023b 100755
|
| --- a/tests/gclient_smoketest.py
|
| +++ b/tests/gclient_smoketest.py
|
| @@ -839,8 +839,18 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| # TODO(maruel): safesync.
|
| self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
|
| # Test unversioned checkout.
|
| - self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'],
|
| - ['running', 'running', 'running', 'running', 'running'])
|
| + self.parseGclient(
|
| + ['sync', '--deps', 'mac', '--jobs', '1'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo_renamed'),
|
| + 'running', 'running'])
|
| # TODO(maruel): http://crosbug.com/3582 hooks run even if not matching, must
|
| # add sync parsing to get the list of updated files.
|
| tree = self.mangle_git_tree(('repo_1@2', 'src'),
|
| @@ -856,10 +866,17 @@ class GClientSmokeGIT(GClientSmokeBase):
|
|
|
| # Test incremental versioned sync: sync backward.
|
| diffdir = os.path.join(self.root_dir, 'src', 'repo2', 'repo_renamed')
|
| - self.parseGclient(['sync', '--jobs', '1', '--revision',
|
| - 'src@' + self.githash('repo_1', 1),
|
| - '--deps', 'mac', '--delete_unversioned_trees'],
|
| - ['running', 'running', ('running', diffdir), 'deleting'])
|
| + self.parseGclient(
|
| + ['sync', '--jobs', '1', '--revision',
|
| + 'src@' + self.githash('repo_1', 1),
|
| + '--deps', 'mac', '--delete_unversioned_trees'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo3'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo4'),
|
| + ('running', diffdir), 'deleting'])
|
| tree = self.mangle_git_tree(('repo_1@1', 'src'),
|
| ('repo_2@2', 'src/repo2'),
|
| ('repo_3@1', 'src/repo2/repo3'),
|
| @@ -869,8 +886,12 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| # Test incremental sync: delete-unversioned_trees isn't there.
|
| expect3 = ('running', os.path.join(self.root_dir, 'src', 'repo2', 'repo3'))
|
| expect4 = ('running', os.path.join(self.root_dir, 'src', 'repo4'))
|
| - self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'],
|
| - ['running', 'running', 'running', expect3, expect4])
|
| + self.parseGclient(
|
| + ['sync', '--deps', 'mac', '--jobs', '1'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo_renamed'),
|
| + 'running', 'running', expect3, expect4])
|
| tree = self.mangle_git_tree(('repo_1@2', 'src'),
|
| ('repo_2@1', 'src/repo2'),
|
| ('repo_3@1', 'src/repo2/repo3'),
|
| @@ -888,9 +909,18 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| self.parseGclient(
|
| ['sync', '--deps', 'mac', '--jobs', '1',
|
| '--revision', 'invalid@' + self.githash('repo_1', 1)],
|
| - ['running', 'running', 'running', 'running', 'running'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo_renamed'),
|
| + 'running', 'running'],
|
| 'Please fix your script, having invalid --revision flags '
|
| - 'will soon considered an error.\n')
|
| + 'will soon considered an error.\n')
|
| tree = self.mangle_git_tree(('repo_1@2', 'src'),
|
| ('repo_2@1', 'src/repo2'),
|
| ('repo_3@2', 'src/repo2/repo_renamed'))
|
| @@ -903,9 +933,21 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| return
|
| # When no solution name is provided, gclient uses the first solution listed.
|
| self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
|
| - self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1',
|
| - '--revision', self.githash('repo_1', 1)],
|
| - ['running', 'running', 'running', 'running'])
|
| + self.parseGclient(
|
| + ['sync', '--deps', 'mac', '--jobs', '1',
|
| + '--revision', self.githash('repo_1', 1)],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo3'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo4'),])
|
| tree = self.mangle_git_tree(('repo_1@1', 'src'),
|
| ('repo_2@2', 'src/repo2'),
|
| ('repo_3@1', 'src/repo2/repo3'),
|
| @@ -918,9 +960,19 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| # TODO(maruel): safesync.
|
| self.gclient(['config', self.git_base + 'repo_1', '--name', 'src'])
|
| # Test unversioned checkout.
|
| - self.parseGclient(['sync', '--deps', 'mac', '--jobs', '8'],
|
| - ['running', 'running', 'running', 'running', 'running'],
|
| - untangle=True)
|
| + self.parseGclient(
|
| + ['sync', '--deps', 'mac', '--jobs', '8'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo_renamed'),
|
| + 'running', 'running'],
|
| + untangle=True)
|
| # TODO(maruel): http://crosbug.com/3582 hooks run even if not matching, must
|
| # add sync parsing to get the list of updated files.
|
| tree = self.mangle_git_tree(('repo_1@2', 'src'),
|
| @@ -940,7 +992,13 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| self.parseGclient(
|
| ['sync', '--revision', 'src@' + self.githash('repo_1', 1),
|
| '--deps', 'mac', '--delete_unversioned_trees', '--jobs', '8'],
|
| - ['running', 'running', expect3, 'deleting'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo4'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo3'),
|
| + expect3, 'deleting'],
|
| untangle=True)
|
| tree = self.mangle_git_tree(('repo_1@1', 'src'),
|
| ('repo_2@2', 'src/repo2'),
|
| @@ -951,11 +1009,15 @@ class GClientSmokeGIT(GClientSmokeBase):
|
| # Test incremental sync: delete-unversioned_trees isn't there.
|
| expect4 = os.path.join(self.root_dir, 'src', 'repo2', 'repo3')
|
| expect5 = os.path.join(self.root_dir, 'src', 'repo4')
|
| - self.parseGclient(['sync', '--deps', 'mac', '--jobs', '8'],
|
| - ['running', 'running', 'running',
|
| - ('running', expect4),
|
| - ('running', expect5)],
|
| - untangle=True)
|
| + self.parseGclient(
|
| + ['sync', '--deps', 'mac', '--jobs', '8'],
|
| + ['running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo_renamed'),
|
| + 'running', 'running',
|
| + ('running', expect4),
|
| + ('running', expect5)],
|
| + untangle=True)
|
| tree = self.mangle_git_tree(('repo_1@2', 'src'),
|
| ('repo_2@1', 'src/repo2'),
|
| ('repo_3@1', 'src/repo2/repo3'),
|
| @@ -1074,11 +1136,20 @@ class GClientSmokeBoth(GClientSmokeBase):
|
| '{"name": "src-git",'
|
| '"url": "' + self.git_base + 'repo_1"}]'])
|
| self.parseGclient(['sync', '--deps', 'mac', '--jobs', '1'],
|
| - ['running', 'running', 'running',
|
| + ['running', 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src-git'),
|
| + 'running',
|
| # This is due to the way svn update is called for a single
|
| # file when File() is used in a DEPS file.
|
| ('running', self.root_dir + '/src/file/other'),
|
| - 'running', 'running', 'running', 'running', 'running', 'running',
|
| + 'running', 'running', 'running', 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo_renamed'),
|
| + 'running',
|
| 'running', 'running'])
|
| tree = self.mangle_git_tree(('repo_1@2', 'src-git'),
|
| ('repo_2@1', 'src/repo2'),
|
| @@ -1110,7 +1181,7 @@ class GClientSmokeBoth(GClientSmokeBase):
|
| self.checkString('', stderr)
|
| self.assertEquals(0, returncode)
|
| results = self.splitBlock(stdout)
|
| - self.assertEquals(12, len(results))
|
| + self.assertEquals(15, len(results))
|
| tree = self.mangle_git_tree(('repo_1@2', 'src-git'),
|
| ('repo_2@1', 'src/repo2'),
|
| ('repo_3@2', 'src/repo2/repo_renamed'))
|
| @@ -1137,8 +1208,19 @@ class GClientSmokeBoth(GClientSmokeBase):
|
| self.parseGclient(
|
| ['sync', '--deps', 'mac', '--jobs', '1', '--revision', '1',
|
| '-r', 'src-git@' + self.githash('repo_1', 1)],
|
| - ['running', 'running', 'running', 'running',
|
| - 'running', 'running', 'running', 'running'],
|
| + ['running', 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src-git'),
|
| + 'running', 'running',
|
| + 'running', 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo2/repo3'),
|
| + 'running',
|
| + # Git checkout.
|
| + ('running', self.root_dir + '/src/repo4'),],
|
| expected_stderr=
|
| 'You must specify the full solution name like --revision src@1\n'
|
| 'when you have multiple solutions setup in your .gclient file.\n'
|
|
|