summaryrefslogtreecommitdiff
path: root/java/robolectric.go
diff options
context:
space:
mode:
author nelsonli <nelsonli@google.com> 2022-11-21 21:37:56 +0800
committer nelsonli <nelsonli@google.com> 2022-12-02 14:55:57 +0800
commit3f97ea2ed979a84b3c24db2a91af3cb05b751b3e (patch)
tree59b44014db92d309d9f3f1fe40df47d6baade143 /java/robolectric.go
parent62ed3dd5f89db9a7deeb31a60be82345eaa248fd (diff)
Set the test suite for Robolectric tests
Mark Robolectric tests as belonging to the `robolectric-tests` suite since tools expect test modules to belong to at least one suite. Note that tests not marked with a suite implicitly get annotated with the `null-suite`. This is also required for Atest Bazel mode which only includes files of test modules with a non-empty suite attribute in the Tradefed test directory. See aosp/2181295 for more details. Test: m out/target/product/vsoc_x86_64/module-info.json Bug: 222437352 Bug: 228799625 Change-Id: I9dedaf1661a351c32d2affbaf1f9b89d672acc3a
Diffstat (limited to 'java/robolectric.go')
-rw-r--r--java/robolectric.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/java/robolectric.go b/java/robolectric.go
index 2cb07981e..3a6b4acce 100644
--- a/java/robolectric.go
+++ b/java/robolectric.go
@@ -296,6 +296,7 @@ func (r *robolectricTest) AndroidMkEntries() []android.AndroidMkEntries {
entries.ExtraEntries = append(entries.ExtraEntries,
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
entries.SetBool("LOCAL_UNINSTALLABLE_MODULE", true)
+ entries.AddStrings("LOCAL_COMPATIBILITY_SUITE", "robolectric-tests")
})
entries.ExtraFooters = []android.AndroidMkExtraFootersFunc{