Merge "Use CommonAttributes.Data for cc_test.data." am: 3636a06fe0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2202161 Change-Id: I3bee1fab8e1c3916bc6f01e29c93233997904b54 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
00124c02c6
1 changed files with 7 additions and 3 deletions
10
cc/test.go
10
cc/test.go
|
@ -643,7 +643,6 @@ type testBinaryAttributes struct {
|
|||
|
||||
Gtest bool
|
||||
Isolated bool
|
||||
Data bazel.LabelListAttribute
|
||||
}
|
||||
|
||||
// testBinaryBp2build is the bp2build converter for cc_test modules. A cc_test's
|
||||
|
@ -659,6 +658,8 @@ func testBinaryBp2build(ctx android.TopDownMutatorContext, m *Module) {
|
|||
var testBinaryAttrs testBinaryAttributes
|
||||
testBinaryAttrs.binaryAttributes = binaryBp2buildAttrs(ctx, m)
|
||||
|
||||
var data bazel.LabelListAttribute
|
||||
|
||||
testBinaryProps := m.GetArchVariantProperties(ctx, &TestBinaryProperties{})
|
||||
for axis, configToProps := range testBinaryProps {
|
||||
for config, props := range configToProps {
|
||||
|
@ -668,7 +669,7 @@ func testBinaryBp2build(ctx android.TopDownMutatorContext, m *Module) {
|
|||
combinedData.Append(android.BazelLabelForModuleSrc(ctx, p.Data))
|
||||
combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_bins))
|
||||
combinedData.Append(android.BazelLabelForModuleDeps(ctx, p.Data_libs))
|
||||
testBinaryAttrs.Data.SetSelectValue(axis, config, combinedData)
|
||||
data.SetSelectValue(axis, config, combinedData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -686,6 +687,9 @@ func testBinaryBp2build(ctx android.TopDownMutatorContext, m *Module) {
|
|||
Rule_class: "cc_test",
|
||||
Bzl_load_location: "//build/bazel/rules/cc:cc_test.bzl",
|
||||
},
|
||||
android.CommonAttributes{Name: m.Name()},
|
||||
android.CommonAttributes{
|
||||
Name: m.Name(),
|
||||
Data: data,
|
||||
},
|
||||
&testBinaryAttrs)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue