mirror of
https://github.com/golang/go
synced 2024-09-23 07:23:18 -06:00
cmd/link/internal/ld: rm os.Getwd from elf_test
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>
This commit is contained in:
parent
9ba8ac253e
commit
a2891aef75
@ -94,14 +94,8 @@ func TestNoDuplicateNeededEntries(t *testing.T) {
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user