gclient flatten: also preserve variables in deps_os entries

This is the same change as in https://chromium-review.googlesource.com/c/586594
applied to _DepsOsToLines.

Bug: 570091
Change-Id: I06a4dc3a9b6dbb001a15b1d7b88fef12cf6c6aaa
Reviewed-on: https://chromium-review.googlesource.com/609980
Reviewed-by: Emma Söderberg <emso@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
changes/80/609980/2
Paweł Hajdan, Jr 8 years ago committed by Commit Bot
parent 11eb715369
commit de86ab35fb

@ -1890,7 +1890,7 @@ def _DepsOsToLines(deps_os):
s.extend([
' # %s' % dep.hierarchy(include_url=False),
' "%s": {' % (name,),
' "url": "%s",' % (dep.url,),
' "url": "%s",' % (dep.raw_url,),
] + condition_part + [
' },',
'',

@ -460,6 +460,7 @@ vars = {
'DummyVariable': 'repo',
'git_base': '%(git_base)s',
'hook1_contents': 'git_hooked1',
'repo5_var': '/repo_5',
}
gclient_gn_args_file = 'src/gclient.args'
gclient_gn_args = ['DummyVariable']
@ -480,15 +481,15 @@ deps = {
deps_os ={
'mac': {
# This entry should not appear in flattened DEPS' |deps|.
'src/mac_repo': '/repo_5',
'src/mac_repo': '{repo5_var}',
},
'unix': {
# This entry should not appear in flattened DEPS' |deps|.
'src/unix_repo': '/repo_5',
'src/unix_repo': '{repo5_var}',
},
'win': {
# This entry should not appear in flattened DEPS' |deps|.
'src/win_repo': '/repo_5',
'src/win_repo': '{repo5_var}',
},
}
hooks = [

@ -625,7 +625,7 @@ class GClientSmokeGIT(GClientSmokeBase):
' "mac": {',
' # src -> src/mac_repo',
' "src/mac_repo": {',
' "url": "/repo_5",',
' "url": "{repo5_var}",',
' },',
'',
' # src -> src/repo8 -> src/recursed_os_repo',
@ -643,7 +643,7 @@ class GClientSmokeGIT(GClientSmokeBase):
'',
' # src -> src/unix_repo',
' "src/unix_repo": {',
' "url": "/repo_5",',
' "url": "{repo5_var}",',
' },',
'',
' },',
@ -651,7 +651,7 @@ class GClientSmokeGIT(GClientSmokeBase):
' "win": {',
' # src -> src/win_repo',
' "src/win_repo": {',
' "url": "/repo_5",',
' "url": "{repo5_var}",',
' },',
'',
' },',
@ -712,6 +712,9 @@ class GClientSmokeGIT(GClientSmokeBase):
' # src',
' "hook1_contents": \'git_hooked1\',',
'',
' # src',
' "repo5_var": \'/repo_5\',',
'',
'}',
'',
], deps_contents.splitlines())
@ -776,7 +779,7 @@ class GClientSmokeGIT(GClientSmokeBase):
' "mac": {',
' # src -> src/mac_repo',
' "src/mac_repo": {',
' "url": "/repo_5",',
' "url": "{repo5_var}",',
' },',
'',
' # src -> src/repo8 -> src/recursed_os_repo',
@ -794,7 +797,7 @@ class GClientSmokeGIT(GClientSmokeBase):
'',
' # src -> src/unix_repo',
' "src/unix_repo": {',
' "url": "/repo_5",',
' "url": "{repo5_var}",',
' },',
'',
' },',
@ -802,7 +805,7 @@ class GClientSmokeGIT(GClientSmokeBase):
' "win": {',
' # src -> src/win_repo',
' "src/win_repo": {',
' "url": "/repo_5",',
' "url": "{repo5_var}",',
' },',
'',
' },',
@ -863,6 +866,9 @@ class GClientSmokeGIT(GClientSmokeBase):
' # src',
' "hook1_contents": \'git_hooked1\',',
'',
' # src',
' "repo5_var": \'/repo_5\',',
'',
'}',
'',
], deps_contents.splitlines())

Loading…
Cancel
Save