runtime: deadlock tests now work with GOMAXPROCS>1

Fixes #4826.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7434046
This commit is contained in:
Dmitriy Vyukov 2013-03-02 10:41:53 +04:00
parent 46890f60ce
commit 01a5b66d95

View file

@ -37,15 +37,7 @@ func executeTest(t *testing.T, templ string, data interface{}) string {
}
f.Close()
// Deadlock tests hang with GOMAXPROCS>1. Issue 4826.
cmd := exec.Command("go", "run", src)
for _, s := range os.Environ() {
if strings.HasPrefix(s, "GOMAXPROCS") {
continue
}
cmd.Env = append(cmd.Env, s)
}
got, _ := cmd.CombinedOutput()
got, _ := exec.Command("go", "run", src).CombinedOutput()
return string(got)
}