blob: b57dbf9311500de72c245e160ed810bc342f8f4e [file] [log] [blame]
Sasha Smundak5c8b09b2020-11-03 23:44:14 -08001
2# Copyright 2021 Google LLC
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16# Top-level test configuration.
17# Converted from the following makefile
18### PRODUCT_PACKAGES += dev
19### PRODUCT_HOST_PACKAGES += host
20### $(call inherit-product, $(LOCAL_PATH)/part1.mk)
21### PRODUCT_COPY_FILES += device_from:device_to
22### include $(LOCAL_PATH)/include1.mk
23### PRODUCT_PACKAGES += dev_after
Sasha Smundaka93e3d92021-07-28 14:34:33 -070024### PRODUCT_COPY_FILES += $(call find-copy-subdir-files,audio_platform_info*.xml,device/google/redfin/audio,$(TARGET_COPY_OUT_VENDOR)/etc) xyz:/etc/xyz
25### PRODUCT_COPY_FILES += $(call copy-files,x.xml y.xml,/etc)
Sasha Smundakc1061382021-07-28 12:29:00 -070026### $(call add_soong_namespace,NS1)
27### $(call add_soong_config_var_value,NS1,v1,abc)
28### $(call add_soong_config_var_value,NS1,v2,def)
29### $(call add_soong_namespace,NS2)
30### $(call add_soong_config_var_value,NS2,v3,abc)
31### $(call add_soong_config_var_value,NS2,v3,xyz)
Sasha Smundak5c8b09b2020-11-03 23:44:14 -080032
33load("//build/make/core:product_config.rbc", "rblf")
34load(":part1.rbc", _part1_init = "init")
35load(":include1.rbc", _include1_init = "init")
36
37def init(g, handle):
38 cfg = rblf.cfg(handle)
39 rblf.setdefault(handle, "PRODUCT_PACKAGES")
40 cfg["PRODUCT_PACKAGES"] += ["dev"]
41 rblf.setdefault(handle, "PRODUCT_HOST_PACKAGES")
42 cfg["PRODUCT_HOST_PACKAGES"] += ["host"]
43 rblf.inherit(handle, "test/part1", _part1_init)
44 rblf.setdefault(handle, "PRODUCT_COPY_FILES")
45 cfg["PRODUCT_COPY_FILES"] += ["device_from:device_to"]
46 _include1_init(g, handle)
47 cfg["PRODUCT_PACKAGES"] += ["dev_after"]
48 cfg["PRODUCT_COPY_FILES"] += (rblf.find_and_copy("audio_platform_info*.xml", "device/google/redfin/audio", "||VENDOR-PATH-PH||/etc") +
Sasha Smundaka93e3d92021-07-28 14:34:33 -070049 ["xyz:/etc/xyz"])
50 cfg["PRODUCT_COPY_FILES"] += rblf.copy_files("x.xml y.xml", "/etc")
Sasha Smundakc1061382021-07-28 12:29:00 -070051 rblf.add_soong_config_namespace(g, "NS1")
52 rblf.add_soong_config_var_value(g, "NS1", "v1", "abc")
53 rblf.add_soong_config_var_value(g, "NS1", "v2", "def")
54 rblf.add_soong_config_namespace(g, "NS2")
55 rblf.add_soong_config_var_value(g, "NS2", "v3", "abc")
56 rblf.add_soong_config_var_value(g, "NS2", "v3", "xyz")
57