Support dynamic config file for cc_test.

Bug: 280028705
Test: local build
Change-Id: Ife445f6a7642bf08651ed7a9501a60950f05f9c4
This commit is contained in:
Yu Liu
2023-08-21 21:23:04 +00:00
parent 962bcdb18e
commit d136a6aa01
2 changed files with 10 additions and 2 deletions

View File

@@ -39,7 +39,8 @@ const (
)
type TestConfigAttributes struct {
Test_config *bazel.Label
Test_config *bazel.Label
Dynamic_config *bazel.Label
Auto_generate_test_config *bool
Template_test_config *bazel.Label
@@ -58,6 +59,11 @@ func GetTestConfigAttributes(
templateInstallBase *string) TestConfigAttributes {
attrs := TestConfigAttributes{}
dynamicConfig := "DynamicConfig.xml"
c, _ := android.BazelStringOrLabelFromProp(ctx, &dynamicConfig)
attrs.Dynamic_config = c.Value
attrs.Test_config = GetTestConfig(ctx, testConfig)
// do not generate a test config if
// 1) test config already found