When specifying the package to build, a relative path is sufficient.
Change-Id: I1ae08065b5cd77ec25be42dc1e664720a07baa62
Reviewed-on: https://go-review.googlesource.com/c/go/+/610039
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
t.Parallel()
dir := t.TempDir()
-
- wd, err := os.Getwd()
- if err != nil {
- t.Fatalf("Failed to get working directory: %v", err)
- }
-
path := filepath.Join(dir, "x")
- argv := []string{"build", "-o", path, filepath.Join(wd, "testdata", "issue39256")}
+ argv := []string{"build", "-o", path, "./testdata/issue39256"}
out, err := testenv.Command(t, testenv.GoToolPath(t), argv...).CombinedOutput()
if err != nil {
t.Fatalf("Build failure: %s\n%s\n", err, string(out))