2020-11-04 08:44:14 +01:00
|
|
|
|
|
|
|
# Copyright 2021 Google LLC
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
# Top-level test configuration.
|
|
|
|
# Converted from the following makefile
|
|
|
|
### PRODUCT_PACKAGES += dev
|
|
|
|
### PRODUCT_HOST_PACKAGES += host
|
|
|
|
### $(call inherit-product, $(LOCAL_PATH)/part1.mk)
|
|
|
|
### PRODUCT_COPY_FILES += device_from:device_to
|
|
|
|
### include $(LOCAL_PATH)/include1.mk
|
|
|
|
### PRODUCT_PACKAGES += dev_after
|
2021-07-28 23:34:33 +02:00
|
|
|
### PRODUCT_COPY_FILES += $(call find-copy-subdir-files,audio_platform_info*.xml,device/google/redfin/audio,$(TARGET_COPY_OUT_VENDOR)/etc) xyz:/etc/xyz
|
|
|
|
### PRODUCT_COPY_FILES += $(call copy-files,x.xml y.xml,/etc)
|
2021-09-18 00:27:37 +02:00
|
|
|
### $(call add_soong_config_namespace,NS1)
|
|
|
|
### $(call soong_config_append,NS1,v1,abc)
|
|
|
|
### $(call soong_config_append,NS1,v2,def)
|
2021-07-28 21:29:00 +02:00
|
|
|
### $(call add_soong_config_var_value,NS2,v3,abc)
|
2021-09-18 00:27:37 +02:00
|
|
|
### $(call soong_config_set,NS2,v3,xyz)
|
2020-11-04 08:44:14 +01:00
|
|
|
|
|
|
|
load("//build/make/core:product_config.rbc", "rblf")
|
|
|
|
load(":part1.rbc", _part1_init = "init")
|
|
|
|
load(":include1.rbc", _include1_init = "init")
|
|
|
|
|
|
|
|
def init(g, handle):
|
|
|
|
cfg = rblf.cfg(handle)
|
|
|
|
rblf.setdefault(handle, "PRODUCT_PACKAGES")
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["dev"]
|
|
|
|
rblf.setdefault(handle, "PRODUCT_HOST_PACKAGES")
|
|
|
|
cfg["PRODUCT_HOST_PACKAGES"] += ["host"]
|
|
|
|
rblf.inherit(handle, "test/part1", _part1_init)
|
|
|
|
rblf.setdefault(handle, "PRODUCT_COPY_FILES")
|
|
|
|
cfg["PRODUCT_COPY_FILES"] += ["device_from:device_to"]
|
|
|
|
_include1_init(g, handle)
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["dev_after"]
|
2021-08-19 01:32:19 +02:00
|
|
|
cfg["PRODUCT_COPY_FILES"] += (rblf.find_and_copy("audio_platform_info*.xml", "device/google/redfin", "||VENDOR-PATH-PH||/etc") +
|
2021-07-28 23:34:33 +02:00
|
|
|
["xyz:/etc/xyz"])
|
|
|
|
cfg["PRODUCT_COPY_FILES"] += rblf.copy_files("x.xml y.xml", "/etc")
|
2021-08-19 18:49:49 +02:00
|
|
|
cfg["PRODUCT_COPY_FILES"] += rblf.copy_files(["from/sub/x", "from/sub/y"], "to")
|
|
|
|
|
2021-09-18 00:27:37 +02:00
|
|
|
rblf.soong_config_namespace(g, "NS1")
|
|
|
|
rblf.soong_config_append(g, "NS1", "v1", "abc")
|
|
|
|
rblf.soong_config_append(g, "NS1", "v2", "def")
|
|
|
|
rblf.soong_config_set(g, "NS2", "v3", "abc")
|
|
|
|
rblf.soong_config_set(g, "NS2", "v3", "xyz")
|
2023-05-02 19:11:02 +02:00
|
|
|
rblf.soong_config_set(g, "NS2", "v4", "xyz ")
|
2021-07-28 21:29:00 +02:00
|
|
|
|
2021-11-18 20:20:34 +01:00
|
|
|
rblf.mkdist_for_goals(g, "goal", "dir1/file1:out1 dir1/file2:out2")
|
|
|
|
rblf.mkdist_for_goals(g, "goal", "dir2/file2:")
|
|
|
|
|
2021-08-27 01:59:55 +02:00
|
|
|
if rblf.board_platform_in(g, "board1 board2"):
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["bad_package"]
|
|
|
|
g["TARGET_BOARD_PLATFORM"] = "board1"
|
|
|
|
if rblf.board_platform_in(g, "board1 board2"):
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["board1_in"]
|
|
|
|
if rblf.board_platform_in(g, ["board3","board2"]):
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["bad_board_in"]
|
|
|
|
if rblf.board_platform_is(g, "board1"):
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["board1_is"]
|
|
|
|
if rblf.board_platform_is(g, "board2"):
|
|
|
|
cfg["PRODUCT_PACKAGES"] += ["bad_board1_is"]
|