summaryrefslogtreecommitdiff
path: root/android/singleton_module_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-01-17 15:00:46 -0800
committer Colin Cross <ccross@android.com> 2024-01-18 13:23:06 -0800
commit74dc598a71ae39194c826c5e19dcc4042dec56e5 (patch)
tree8eb3d24e78e626d59089c6d91284b5cec23f6e77 /android/singleton_module_test.go
parent7e6a9012c0228bb9dc498b7d9d04cca819dca786 (diff)
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
Diffstat (limited to 'android/singleton_module_test.go')
-rw-r--r--android/singleton_module_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/android/singleton_module_test.go b/android/singleton_module_test.go
index 9d98478e2..3b1bf39e3 100644
--- a/android/singleton_module_test.go
+++ b/android/singleton_module_test.go
@@ -103,6 +103,9 @@ func testVariantSingletonModuleMutator(ctx BottomUpMutatorContext) {
}
func TestVariantSingletonModule(t *testing.T) {
+ if testing.Short() {
+ t.Skip("test fails with data race enabled")
+ }
bp := `
test_singleton_module {
name: "test_singleton_module",