Commit graph

5 commits

Author SHA1 Message Date
Colin Cross
74dc598a71 Disable TestVariantSingletonModule when go test -short is used
TestVariantSingletonModule tests that an error is produced when a
mutator creates variants of a SingletonModule.  It also triggers
a data race when cloneLogicModules copies the properties, as the
ModuleFactory of a SingletonModule always returns the same module
with the same property structs.  The build is about to fail with an
error anyways, so hopefully the data race isn't a problem.  There
is no way to disable the test when the data race detector is enabled,
so disable it when -short is enabled, which is the case for all of
our CI testing.

Test: go test -race -short ./...
Change-Id: I944a4901acb60df8e590270f178961d95095a7e9
2024-01-18 13:23:06 -08:00
Martin Stjernholm
1ebef5b78c Move functionality to test install rules into testing.go.
In preparation for test in the cc package.

Test: m nothing
Bug: 211770050
Change-Id: I3f6190e102c607a0b6246d78d7bde7fcffa21650
2022-02-10 23:36:06 +00:00
Paul Duffin
30ac3e7ca7 Remove uses of FixtureFactory from android package
Bug: 183235980
Test: m nothing
Change-Id: I72898ada020ee1a73fd534c61afb5c22fa00c1e5
2021-03-22 18:31:53 +00:00
Paul Duffin
d65970072d Convert android/singleton_module_test.go to test fixtures
Bug: 182885307
Test: m nothing
Change-Id: I7f9f3eb66279fe5a2447aefa9b636144c32ce92a
2021-03-18 12:18:05 +00:00
Colin Cross
9aed5bc715 Add a new SingletonModule type
A SingletonModule is halfway between a Singleton and a Module.  It has
access to visiting other modules via its GenerateSingletonBuildActions
method, but must be defined in an Android.bp file and can also be
depended on like a module.

Bug: 176904285
Test: singleton_module_test.go
Change-Id: I1b2bfdfb3927c1eabf431c53213cb7c581e33ca4
2021-01-07 17:19:27 -08:00