Commit 4654e90f authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[Fuchsia] Fix gen_build_defs.py to recognize device_profile sdk parts

The script was failing in new SDK because the new SDK added new part
type 'device_profile' that the script didn't recognize. Added the new
type to the list. Also fixed the error-handling code - previously it
was failing with NameError while trying to throw an exception to report
the unrecognized part type.

Change-Id: I5f9e59edf4ed1532c1ed7fd6a23007a3f11c5ecf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1664791
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670155}
parent 840bbf95
...@@ -170,11 +170,12 @@ _CONVERSION_FUNCTION_MAP = { ...@@ -170,11 +170,12 @@ _CONVERSION_FUNCTION_MAP = {
# No need to build targets for these types yet. # No need to build targets for these types yet.
'dart_library': ConvertNoOp, 'dart_library': ConvertNoOp,
'device_profile': ConvertNoOp,
'documentation': ConvertNoOp,
'host_tool': ConvertNoOp, 'host_tool': ConvertNoOp,
'image': ConvertNoOp, 'image': ConvertNoOp,
'loadable_module': ConvertNoOp, 'loadable_module': ConvertNoOp,
'sysroot': ConvertNoOp, 'sysroot': ConvertNoOp,
'documentation': ConvertNoOp,
} }
...@@ -193,7 +194,7 @@ def ConvertSdkManifests(): ...@@ -193,7 +194,7 @@ def ConvertSdkManifests():
convert_function = _CONVERSION_FUNCTION_MAP.get(part['type']) convert_function = _CONVERSION_FUNCTION_MAP.get(part['type'])
if convert_function is None: if convert_function is None:
raise Exception('Unexpected SDK artifact type %s in %s.' % raise Exception('Unexpected SDK artifact type %s in %s.' %
(parsed['type'], next_part)) (parsed['type'], part['meta']))
converted = convert_function(parsed) converted = convert_function(parsed)
if converted: if converted:
......
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