Merge changes from topic "soong-tests-presubmit" into main

* changes:
  Add script to run Soong tests with go tools
  Disable TestVariantSingletonModule when go test -short is used
  Fix data race in propagateRROEnforcementMutator
  Fix data race in finder_test.go
  Fix data race in dex_bootjars
  Fix race CommonGlobalCflags when running tests in parallel.
  Fix data race in snapshot singletons when running parallel tests
This commit is contained in:
Colin Cross
2024-01-18 23:58:45 +00:00
committed by Gerrit Code Review
9 changed files with 154 additions and 69 deletions

View File

@@ -16,6 +16,7 @@ package config
import (
"runtime"
"slices"
"strings"
"android/soong/android"
@@ -400,7 +401,7 @@ func init() {
exportedVars.ExportStringList("CommonGlobalCflags", commonGlobalCflags)
pctx.VariableFunc("CommonGlobalCflags", func(ctx android.PackageVarContext) string {
flags := commonGlobalCflags
flags := slices.Clone(commonGlobalCflags)
// http://b/131390872
// Automatically initialize any uninitialized stack variables.