Skip to content

Commit 916d23b

Browse files
committed
cmd/coordinator: use explicit ./ in exec to say we want a relative exec
This makes cmd/coordinator continue to work even once os/exec starts rejecting such things as mistakes by default. Fixes the failure seen in https://storage.googleapis.com/go-build-log/a0daaefa/windows-386-2008_c8379596.log For golang/go#43724. Change-Id: I71329f3233febd1c5dd22fc28e0dccb62ef2bef3 Reviewed-on: https://go-review.googlesource.com/c/build/+/399554 Run-TryBot: Russ Cox <[email protected]> Reviewed-by: Bryan Mills <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent edb8d45 commit 916d23b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/coordinator/buildstatus.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ func (st *buildStatus) distTestList() (names []string, remoteErr, err error) {
966966
args = append(args, "--compile-only")
967967
}
968968
var buf bytes.Buffer
969-
remoteErr, err = st.bc.Exec(st.ctx, "go/bin/go", buildlet.ExecOpts{
969+
remoteErr, err = st.bc.Exec(st.ctx, "./go/bin/go", buildlet.ExecOpts{
970970
Output: &buf,
971971
ExtraEnv: append(st.conf.Env(), "GOROOT="+goroot),
972972
OnStartExec: func() { st.LogEventTime("discovering_tests") },
@@ -1138,7 +1138,7 @@ func (st *buildStatus) runSubrepoTests() (remoteErr, err error) {
11381138

11391139
var remoteErrors []error
11401140
for _, tr := range testRuns {
1141-
rErr, err := st.bc.Exec(st.ctx, "go/bin/go", buildlet.ExecOpts{
1141+
rErr, err := st.bc.Exec(st.ctx, "./go/bin/go", buildlet.ExecOpts{
11421142
Debug: true, // make buildlet print extra debug in output for failures
11431143
Output: st,
11441144
Dir: tr.Dir,
@@ -1329,7 +1329,7 @@ func (st *buildStatus) runBenchmarkTests() (remoteErr, err error) {
13291329
"GOPROXY="+moduleProxy(), // GKE value but will be ignored/overwritten by reverse buildlets
13301330
)
13311331
env = append(env, st.conf.ModulesEnv(st.SubName)...)
1332-
rErr, err := st.bc.Exec(st.ctx, "go/bin/go", buildlet.ExecOpts{
1332+
rErr, err := st.bc.Exec(st.ctx, "./go/bin/go", buildlet.ExecOpts{
13331333
Debug: true, // make buildlet print extra debug in output for failures
13341334
Output: st,
13351335
Dir: "gopath/src/" + repoPath,
@@ -1676,7 +1676,7 @@ func (st *buildStatus) runTestsOnBuildlet(bc buildlet.Client, tis []*testItem, g
16761676
)
16771677
env = append(env, st.conf.ModulesEnv("go")...)
16781678

1679-
remoteErr, err := bc.Exec(ctx, "go/bin/go", buildlet.ExecOpts{
1679+
remoteErr, err := bc.Exec(ctx, "./go/bin/go", buildlet.ExecOpts{
16801680
// We set Dir to "." instead of the default ("go/bin") so when the dist tests
16811681
// try to run os/exec.Command("go", "test", ...), the LookPath of "go" doesn't
16821682
// return "./go.exe" (which exists in the current directory: "go/bin") and then

0 commit comments

Comments
 (0)