summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index 6ef5c6ae5..114843056 100644
--- a/android/module.go
+++ b/android/module.go
@@ -549,6 +549,13 @@ func (t *CommonTestOptions) SetAndroidMkEntries(entries *AndroidMkEntries) {
}
}
+func (t *CommonTestOptions) SetAndroidMkInfoEntries(entries *AndroidMkInfo) {
+ entries.SetBoolIfTrue("LOCAL_IS_UNIT_TEST", Bool(t.Unit_test))
+ if len(t.Tags) > 0 {
+ entries.AddStrings("LOCAL_TEST_OPTIONS_TAGS", t.Tags...)
+ }
+}
+
// The key to use in TaggedDistFiles when a Dist structure does not specify a
// tag property. This intentionally does not use "" as the default because that
// would mean that an empty tag would have a different meaning when used in a dist
@@ -2091,6 +2098,10 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
SetProvider(ctx, HostToolProviderKey, HostToolProviderData{
HostToolPath: h.HostToolPath()})
}
+
+ if p, ok := m.module.(AndroidMkProviderInfoProducer); ok && !shouldSkipAndroidMkProcessing(ctx, m) {
+ SetProvider(ctx, AndroidMkInfoProvider, p.PrepareAndroidMKProviderInfo(ctx.Config()))
+ }
}
func SetJarJarPrefixHandler(handler func(ModuleContext)) {