From 87b2ab28a80c11b264794344c4299e734b87e24d Mon Sep 17 00:00:00 2001 From: Aditya Choudhary Date: Fri, 17 Nov 2023 15:27:06 +0000 Subject: Add test spec provider to test modules. Provider added for the following test modules in this change: art_cc_test, cc_benchmark, cc_fuzz, cc_test, cc_test_host, rust_test,and rust_test_host. Bug: 296873595 Test: Manual test Change-Id: I815680529bcbecacb3a2bdb8f3746053afdee48c --- rust/rust.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'rust/rust.go') diff --git a/rust/rust.go b/rust/rust.go index 19c5230b4..15144acad 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -20,6 +20,7 @@ import ( "android/soong/bazel" "android/soong/bloaty" + "android/soong/testing" "android/soong/ui/metrics/bp2build_metrics_proto" "github.com/google/blueprint" @@ -144,8 +145,9 @@ type Module struct { Properties BaseProperties - hod android.HostOrDeviceSupported - multilib android.Multilib + hod android.HostOrDeviceSupported + multilib android.Multilib + testModule bool makeLinkType string @@ -1038,6 +1040,9 @@ func (mod *Module) GenerateAndroidBuildActions(actx android.ModuleContext) { ctx.Phony("rust", ctx.RustModule().OutputFile().Path()) } + if mod.testModule { + ctx.SetProvider(testing.TestModuleProviderKey, testing.TestModuleProviderData{}) + } } func (mod *Module) deps(ctx DepsContext) Deps { -- cgit v1.2.3-59-g8ed1b