use replaceEnv

Change-Id: I235ec5a9587218a6d77a5df72c48c568a48901f2
This commit is contained in:
Mauri de Souza Meneguzzo 2023-12-13 16:53:49 -03:00
parent 6b2a14a169
commit 60bd64a8fb
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ func TestMSAN(t *testing.T) {
outPath := dir.Join(name)
buildcmd := config.goCmdWithExperiments("build", []string{"-o", outPath, srcPath(tc.src)}, tc.experiments)
// allow tests to define -f flags in CGO_CFLAGS
buildcmd.Env = append(buildcmd.Environ(), "CGO_CFLAGS_ALLOW=-f.*")
replaceEnv(buildcmd, "CGO_CFLAGS_ALLOW", "-f.*")
mustRun(t, buildcmd)
cmd := hangProneCmd(outPath)