summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
author Zhenhuang Wang <zeek@google.com> 2022-08-24 02:14:02 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-08-24 02:14:02 +0000
commit5e7c4756b51ece50898ce6d5475c16d288102631 (patch)
treecf23a212d2e854a5c33e47b7971ab7edc05510d7 /android/module.go
parent9f4f8a3cc786b5a6c36ea11775a8d43be1f46a0f (diff)
parent409d27712f927c84b58091d2be54c7638cd619cd (diff)
Merge "Add a new `test_options.tags` attribute to customize test execution"
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go
index eb099f991..5908233a2 100644
--- a/android/module.go
+++ b/android/module.go
@@ -942,12 +942,19 @@ type CommonTestOptions struct {
// If the test is a hostside (no device required) unittest that shall be run
// during presubmit check.
Unit_test *bool
+
+ // Tags provide additional metadata to customize test execution by downstream
+ // test runners. The tags have no special meaning to Soong.
+ Tags []string
}
// SetAndroidMkEntries sets AndroidMkEntries according to the value of base
// `test_options`.
func (t *CommonTestOptions) SetAndroidMkEntries(entries *AndroidMkEntries) {
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