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

Commit 74dc598a authored by Colin Cross's avatar Colin Cross
Browse files

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
parent 7e6a9012
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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",