Skip to content

Commit

Permalink
internal/gomote: align golangbuild's and buildlet's work directory
Browse files Browse the repository at this point in the history
golangbuild already assumes it's running in the workdir, but buildlet
creates another workdir in golangbuild's workdir's tmp directory. This
means the checkout of x/ repos ends up in a different directory than
expected, not the work directory buildlet assumes.

Set the workdir for buildlet explicitly in the golangbuild case to match
golangbuild's expectations. This means users will be dropped into a
directory with a whole bunch of stuff, like the tools they need (already
in PATH, but sometimes useful) and whatever repo they wanted checked
out for them.

Change-Id: I7ee3ba9f08cb23b3abc571b7a60b534112c5cca9
Reviewed-on: https://go-review.googlesource.com/c/build/+/615956
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Auto-Submit: Michael Knyszek <[email protected]>
  • Loading branch information
mknyszek authored and gopherbot committed Sep 30, 2024
1 parent e107a48 commit 4675cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/gomote/swarming.go
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ if __name__ == "__main__":
os.remove(buildlet_path)
urllib.request.urlretrieve("https://storage.googleapis.com/go-builder-data/buildlet.%s-%s", buildlet_path)
make_executable(os.getcwd() + sep + buildlet_file)
subprocess.run(["%s", buildlet_path, "--coordinator=gomotessh.golang.org:443", "--reverse-type=swarming-task", "-swarming-bot", "-halt=false"], shell=False, env=os.environ.copy())
subprocess.run(["%s", buildlet_path, "--workdir=.", "--coordinator=gomotessh.golang.org:443", "--reverse-type=swarming-task", "-swarming-bot", "-halt=false"], shell=False, env=os.environ.copy())
`
return fmt.Sprintf(cmd, goos, goarch, golangbuildBin)
}
Expand Down

0 comments on commit 4675cb5

Please sign in to comment.