summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go9
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 {