]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: use stripped test environment for TestGdbPython
authorAustin Clements <austin@google.com>
Tue, 26 May 2015 19:21:18 +0000 (15:21 -0400)
committerAustin Clements <austin@google.com>
Thu, 28 May 2015 17:39:08 +0000 (17:39 +0000)
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>
src/runtime/runtime-gdb_test.go

index 8d04f6328c6a8f73b6b34b337a664f901d1e1e96..f4014b2e05276258d3275097e5b9e97b03588e25 100644 (file)
@@ -59,7 +59,7 @@ func TestGdbPython(t *testing.T) {
 
        cmd := exec.Command("go", "build", "-o", "a.exe")
        cmd.Dir = dir
-       out, err := cmd.CombinedOutput()
+       out, err := testEnv(cmd).CombinedOutput()
        if err != nil {
                t.Fatalf("building source %v\n%s", err, out)
        }