Translate copy-files, add_soong_config_namespace and add_soong_config_var_value macros
Bug: 194521362 Test: internal Change-Id: I88fb62f057476d96dfb056813a900e8497e7bbb9
This commit is contained in:
@@ -666,7 +666,9 @@ $(info $(dir $(lastword $(PRODUCT_COPY_FILES))))
|
||||
$(info $(dir $(lastword $(foobar))))
|
||||
$(info $(abspath foo/bar))
|
||||
$(info $(notdir foo/bar))
|
||||
|
||||
$(call add_soong_config_namespace,snsconfig)
|
||||
$(call add_soong_config_var_value,snsconfig,imagetype,odm_image)
|
||||
PRODUCT_COPY_FILES := $(call copy-files,$(wildcard foo*.mk),etc)
|
||||
`,
|
||||
expected: `load("//build/make/core:product_config.rbc", "rblf")
|
||||
|
||||
@@ -684,6 +686,9 @@ def init(g, handle):
|
||||
rblf.mkinfo("product.mk", rblf.dir((_foobar).split()[-1]))
|
||||
rblf.mkinfo("product.mk", rblf.abspath("foo/bar"))
|
||||
rblf.mkinfo("product.mk", rblf.notdir("foo/bar"))
|
||||
rblf.add_soong_config_namespace(g, "snsconfig")
|
||||
rblf.add_soong_config_var_value(g, "snsconfig", "imagetype", "odm_image")
|
||||
cfg["PRODUCT_COPY_FILES"] = rblf.copy_files(rblf.expand_wildcard("foo*.mk"), "etc")
|
||||
`,
|
||||
},
|
||||
{
|
||||
@@ -756,6 +761,25 @@ def init(g, handle):
|
||||
cfg["PRODUCT_LIST1"] += ["c"]
|
||||
rblf.setdefault(handle, "PRODUCT_LIST2")
|
||||
cfg["PRODUCT_LIST2"] += ["c"]
|
||||
`,
|
||||
},
|
||||
{
|
||||
desc: "soong namespace assignments",
|
||||
mkname: "product.mk",
|
||||
in: `
|
||||
SOONG_CONFIG_NAMESPACES += cvd
|
||||
SOONG_CONFIG_cvd += launch_configs
|
||||
SOONG_CONFIG_cvd_launch_configs += cvd_config_auto.json
|
||||
SOONG_CONFIG_cvd += grub_config
|
||||
SOONG_CONFIG_cvd_grub_config += grub.cfg
|
||||
`,
|
||||
expected: `load("//build/make/core:product_config.rbc", "rblf")
|
||||
|
||||
def init(g, handle):
|
||||
cfg = rblf.cfg(handle)
|
||||
rblf.add_soong_config_namespace(g, "cvd")
|
||||
rblf.add_soong_config_var_value(g, "cvd", "launch_configs", "cvd_config_auto.json")
|
||||
rblf.add_soong_config_var_value(g, "cvd", "grub_config", "grub.cfg")
|
||||
`,
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user