1diff --git src/go/build/deps_test.go src/go/build/deps_test.go 2index 29dbe47d29..53e0e287bc 100644 3--- src/go/build/deps_test.go 4+++ src/go/build/deps_test.go 5@@ -191,7 +191,7 @@ var pkgDeps = map[string][]string{ 6 "testing": {"L2", "flag", "fmt", "internal/race", "os", "runtime/debug", "runtime/pprof", "runtime/trace", "time"}, 7 "testing/iotest": {"L2", "log"}, 8 "testing/quick": {"L2", "flag", "fmt", "reflect", "time"}, 9- "internal/testenv": {"L2", "OS", "flag", "testing", "syscall"}, 10+ "internal/testenv": {"L2", "OS", "os.exec", "flag", "testing", "syscall"}, 11 12 // L4 is defined as L3+fmt+log+time, because in general once 13 // you're using L3 packages, use of fmt, log, or time is not a big deal. 14diff --git src/internal/testenv/testenv.go src/internal/testenv/testenv.go 15index 8f69fe0da5..d52b85e122 100644 16--- src/internal/testenv/testenv.go 17+++ src/internal/testenv/testenv.go 18@@ -48,6 +48,9 @@ func HasGoBuild() bool { 19 return false 20 } 21 } 22+ if _, err := exec.LookPath("go"); err != nil { 23+ return false 24+ } 25 return true 26 } 27 28