Update tast to use Go's new package cache after switching to 1.10 |
|||
Issue descriptionRight now, the "tast run" and "tast build" commands use "go build -i -pkgdir /tmp/tast/... -o /path/to/bin" to cache packages that are compiled when building test bundles. This makes builds slower than they need to be (~1 sec on my workstation even when nothing has changed), since "go build" always rebuilds the executable file. Once the Chrome OS toolchain switches to Go 1.10, I think that this can be simplified. Packages are automatically cached to a location controllable by $GOCACHE. See https://groups.google.com/forum/#!msg/golang-dev/qfa3mHN4ZPA/X2UzjNV1BAAJ and https://tip.golang.org/doc/go1.10#build for more details. I'm not sure whether "go install" will support arbitrary destination paths, so I may still need to use "go build" and make tast compare timestamps itself if I want to avoid rebuilding executables unnecessarily.
,
Apr 24 2018
,
Apr 27 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/tast/+/96bc6953d2104225a7f1469527b0e0e651f0597d commit 96bc6953d2104225a7f1469527b0e0e651f0597d Author: Daniel Erat <derat@chromium.org> Date: Fri Apr 27 04:10:22 2018 tast: Use "go install" when building test bundles. Update the tast command to use "go install" rather than "go build -i -pkgdir" when building test bundles (or local_test_runner). "go build" and "go install" now cache compiled packages to $HOME/.cache/go-build, so there's no need to create our own directory for this. (Go also handles cleaning old files out of the new directory.) BUG= chromium:813790 TEST=verified that "go build", "go run", and "go list" still work (with both -buildtype=local and -buildtype=remote, for the latter two) and that building takes ~400 ms with -checkbuilddeps=false to bypass slow equery Change-Id: I421ccac419aec8dd6e7cb140a92b1e2b071d28f4 Reviewed-on: https://chromium-review.googlesource.com/1025399 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Rahul Chaudhry <rahulchaudhry@chromium.org> [modify] https://crrev.com/96bc6953d2104225a7f1469527b0e0e651f0597d/src/chromiumos/cmd/tast/run/remote.go [modify] https://crrev.com/96bc6953d2104225a7f1469527b0e0e651f0597d/src/chromiumos/cmd/tast/run/local.go [modify] https://crrev.com/96bc6953d2104225a7f1469527b0e0e651f0597d/src/chromiumos/cmd/tast/build_cmd.go [modify] https://crrev.com/96bc6953d2104225a7f1469527b0e0e651f0597d/src/chromiumos/cmd/tast/build/config.go [modify] https://crrev.com/96bc6953d2104225a7f1469527b0e0e651f0597d/src/chromiumos/cmd/tast/build/build_test.go [modify] https://crrev.com/96bc6953d2104225a7f1469527b0e0e651f0597d/src/chromiumos/cmd/tast/build/build.go
,
Apr 27 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by ayatane@chromium.org
, Apr 12 2018