mirror of
https://github.com/golang/go
synced 2024-11-18 11:04:42 -07:00
runtime: use stripped test environment for TestGdbPython
Most runtime tests that invoke the compiler to build a sub-test binary do so with a special environment constructed by testEnv that strips out environment variables that should apply to the test but not to the build. Fix TestGdbPython to use this test environment when invoking go build, like other tests do. Change-Id: Iafdf89d4765c587cbebc427a5d61cb8a7e71b326 Reviewed-on: https://go-review.googlesource.com/10455 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
0c02b33acd
commit
4a1957d0aa
@ -59,7 +59,7 @@ func TestGdbPython(t *testing.T) {
|
|||||||
|
|
||||||
cmd := exec.Command("go", "build", "-o", "a.exe")
|
cmd := exec.Command("go", "build", "-o", "a.exe")
|
||||||
cmd.Dir = dir
|
cmd.Dir = dir
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := testEnv(cmd).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("building source %v\n%s", err, out)
|
t.Fatalf("building source %v\n%s", err, out)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user