Commit c69b32e1 authored by Paweł Hajdan, Jr's avatar Paweł Hajdan, Jr Committed by Commit Bot

gclient flatten: parse DEPS file for deps_os recursedeps

Bug: 570091
Change-Id: I773b74b042233efa2a525f5f47e920468b7fea4a
Reviewed-on: https://chromium-review.googlesource.com/618930Reviewed-by: 's avatarMichael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
parent a76b5658
...@@ -1799,6 +1799,9 @@ class Flattener(object): ...@@ -1799,6 +1799,9 @@ class Flattener(object):
Arguments: Arguments:
dep (Dependency): dependency to process dep (Dependency): dependency to process
""" """
if not dep.deps_parsed:
dep.ParseDepsFile()
self._allowed_hosts.update(dep.allowed_hosts) self._allowed_hosts.update(dep.allowed_hosts)
for key, value in dep.get_vars().iteritems(): for key, value in dep.get_vars().iteritems():
......
...@@ -298,7 +298,7 @@ class FakeReposBase(object): ...@@ -298,7 +298,7 @@ class FakeReposBase(object):
class FakeRepos(FakeReposBase): class FakeRepos(FakeReposBase):
"""Implements populateGit().""" """Implements populateGit()."""
NB_GIT_REPOS = 10 NB_GIT_REPOS = 12
def populateGit(self): def populateGit(self):
# Testing: # Testing:
...@@ -593,12 +593,30 @@ deps = { ...@@ -593,12 +593,30 @@ deps = {
# in recursedeps. # in recursedeps.
'src/repo6': '/repo_6', 'src/repo6': '/repo_6',
} }
deps_os = {
'ios': {
'src/repo11': '/repo_11',
}
}
recursedeps = [ recursedeps = [
'src/repo9', 'src/repo9',
'src/repo11',
]""", ]""",
'origin': 'git/repo_10@1\n', 'origin': 'git/repo_10@1\n',
}) })
self._commit_git('repo_11', {
'DEPS': """
deps = {
'src/repo12': '/repo12',
}""",
'origin': 'git/repo_11@1\n',
})
self._commit_git('repo_12', {
'origin': 'git/repo_12@1\n',
})
class FakeRepoSkiaDEPS(FakeReposBase): class FakeRepoSkiaDEPS(FakeReposBase):
"""Simulates the Skia DEPS transition in Chrome.""" """Simulates the Skia DEPS transition in Chrome."""
......
...@@ -879,7 +879,7 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -879,7 +879,7 @@ class GClientSmokeGIT(GClientSmokeBase):
self.assertFalse(os.path.exists(output_deps)) self.assertFalse(os.path.exists(output_deps))
self.gclient(['config', self.git_base + 'repo_10', '--name', 'src']) self.gclient(['config', self.git_base + 'repo_10', '--name', 'src'])
self.gclient(['sync']) self.gclient(['sync', '--process-all-deps'])
self.gclient(['flatten', '-v', '-v', '-v', '--output-deps', output_deps]) self.gclient(['flatten', '-v', '-v', '-v', '--output-deps', output_deps])
with open(output_deps) as f: with open(output_deps) as f:
...@@ -892,6 +892,11 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -892,6 +892,11 @@ class GClientSmokeGIT(GClientSmokeBase):
' "url": "git://127.0.0.1:20000/git/repo_10",', ' "url": "git://127.0.0.1:20000/git/repo_10",',
' },', ' },',
'', '',
' # src -> src/repo11 -> src/repo12',
' "src/repo12": {',
' "url": "/repo12",',
' },',
'',
' # src -> src/repo6', ' # src -> src/repo6',
' "src/repo6": {', ' "src/repo6": {',
' "url": "/repo_6",', ' "url": "/repo_6",',
...@@ -923,6 +928,14 @@ class GClientSmokeGIT(GClientSmokeBase): ...@@ -923,6 +928,14 @@ class GClientSmokeGIT(GClientSmokeBase):
'', '',
' },', ' },',
'', '',
' "ios": {',
' # src -> src/repo11',
' "src/repo11": {',
' "url": "/repo_11",',
' },',
'',
' },',
'',
' "mac": {', ' "mac": {',
' # src -> src/repo9 -> src/repo8 -> src/recursed_os_repo', ' # src -> src/repo9 -> src/repo8 -> src/recursed_os_repo',
' "src/recursed_os_repo": {', ' "src/recursed_os_repo": {',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment