Convert is-board-platform2/is-board-platform-in-list2/is-vendor-board-qcom macros.

Bug: 193540681
Test: internal
Change-Id: I76c46d89f10b16b75438803479fec4aa468e3010
This commit is contained in:
Sasha Smundak
2021-08-25 14:11:04 -07:00
parent 2afb9d7722
commit 3a9b8e8943
2 changed files with 52 additions and 0 deletions

View File

@@ -560,6 +560,27 @@ def init(g, handle):
pass
elif g["TARGET_PRODUCT"] in g.get("PLATFORM_LIST", []):
pass
`,
},
{
desc: "new is-board calls",
mkname: "product.mk",
in: `
ifneq (,$(call is-board-platform-in-list2,msm8998 $(X))
else ifeq (,$(call is-board-platform2,copper)
else ifneq (,$(call is-vendor-board-qcom))
endif
`,
expected: `load("//build/make/core:product_config.rbc", "rblf")
def init(g, handle):
cfg = rblf.cfg(handle)
if rblf.board_platform_in(g, "msm8998 %s" % g.get("X", "")):
pass
elif not rblf.board_platform_is(g, "copper"):
pass
elif g.get("TARGET_BOARD_PLATFORM", "") not in g["QCOM_BOARD_PLATFORMS"]:
pass
`,
},
{