]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: pass current environment to syscall.Exec
authorIan Lance Taylor <iant@golang.org>
Fri, 20 Jan 2017 06:07:20 +0000 (22:07 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 20 Jan 2017 21:12:54 +0000 (21:12 +0000)
This is needed for typical tests with gccgo, as it passes the
LD_LIBRARY_PATH environment variable to the new program.

Change-Id: I9bf4b0dbdff63f5449c7fcb8124eaeab10ed7f34
Reviewed-on: https://go-review.googlesource.com/35481
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/test/issue18146.go

index ffb04e9037ba4e1db7e35fabda86ef9011e2587a..3c600463f0335447f8a36c44fb20f607519f2b64 100644 (file)
@@ -73,7 +73,7 @@ func test18146(t *testing.T) {
                }
                runtime.GOMAXPROCS(threads)
                argv := append(os.Args, "-test.run=NoSuchTestExists")
-               if err := syscall.Exec(os.Args[0], argv, nil); err != nil {
+               if err := syscall.Exec(os.Args[0], argv, os.Environ()); err != nil {
                        t.Fatal(err)
                }
        }