diff options
author | 2023-11-17 15:27:06 +0000 | |
---|---|---|
committer | 2023-11-20 21:52:56 +0000 | |
commit | 87b2ab28a80c11b264794344c4299e734b87e24d (patch) | |
tree | 9cc8db0392d01889e307cd07e0ff78baa1823efc /rust/rust.go | |
parent | b91108c9c07c45ff708030114372db6d217b4e2d (diff) |
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
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 9 |
1 files changed, 7 insertions, 2 deletions
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 { |