Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f97ea2e authored by nelsonli's avatar nelsonli
Browse files

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
parent 62ed3dd5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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{