Commit ecc22ee2 authored by Brian Sheedy's avatar Brian Sheedy Committed by Chromium LUCI CQ

Fix mb.py string GN args

Fixes a recent regression where mb.py started incorrectly classifying
tests due to a change in how GN args were parsed from the build
directory. This re-adds quotes around string args, which brings the
previous behavior back.

Bug: 1159618
Change-Id: Ide52674e258d2a2698d0011928bd0d452a92cb8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596640
Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: default avatarBen Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838252}
parent e6ba6063
...@@ -875,6 +875,11 @@ class MetaBuildWrapper(object): ...@@ -875,6 +875,11 @@ class MetaBuildWrapper(object):
args_contents = ReplaceImports(args_contents) args_contents = ReplaceImports(args_contents)
args_dict = gn_helpers.FromGNArgs(args_contents) args_dict = gn_helpers.FromGNArgs(args_contents)
# Re-add the quotes around strings so they show up as they would in the
# args.gn file.
for k, v in args_dict.items():
if isinstance(v, str):
args_dict[k] = '"%s"' % v
return ' '.join(['%s=%s' % (k, v) for (k, v) in args_dict.items()]) return ' '.join(['%s=%s' % (k, v) for (k, v) in args_dict.items()])
def Lookup(self): def Lookup(self):
......
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