diff options
author | Russ Cox <rsc@golang.org> | 2015-05-21 13:28:17 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2015-05-21 17:32:17 +0000 |
commit | cf932cd897a3eaf3aa6fec3ba5d0ab1d9107eebb (patch) | |
tree | 5cf3a6e5f2c2960c0766c27e38e30095c485c5e4 /src/cmd/pack | |
parent | 0f4132c907d9749a1a41a20af7856065ee10de9e (diff) | |
download | go-cf932cd897a3eaf3aa6fec3ba5d0ab1d9107eebb.tar.gz go-cf932cd897a3eaf3aa6fec3ba5d0ab1d9107eebb.zip |
all: retire architecture letter in file names, public API
This CL removes the remaining visible uses of the "architecture letter" concept.
(They are no longer in tool names nor in source directory names.)
Because the architecture letter concept is now gone, delete GOCHAR
from "go env" output, and change go/build.ArchChar to return an
error always.
The architecture letter is still used in the compiler and linker sources
as a clumsy architecture enumeration, but that use is not visible to
Go users and can be cleaned up separately.
Change-Id: I4d97a38f372003fb610c9c5241bea440d9dbeb8d
Reviewed-on: https://go-review.googlesource.com/10289
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/cmd/pack')
-rw-r--r-- | src/cmd/pack/pack_test.go | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/cmd/pack/pack_test.go b/src/cmd/pack/pack_test.go index 97992059b9..cd32020501 100644 --- a/src/cmd/pack/pack_test.go +++ b/src/cmd/pack/pack_test.go @@ -13,7 +13,6 @@ import ( "os" "os/exec" "path/filepath" - "regexp" "runtime" "testing" "time" @@ -223,15 +222,13 @@ func TestHello(t *testing.T) { t.Fatal(err) } - char := findChar(t, dir) - run := func(args ...string) string { return doRun(t, dir, args...) } run("go", "build", "cmd/pack") // writes pack binary to dir run("go", "tool", "compile", "hello.go") - run("./pack", "grc", "hello.a", "hello."+char) + run("./pack", "grc", "hello.a", "hello.o") run("go", "tool", "link", "-o", "a.out", "hello.a") out := run("./a.out") if out != "hello world\n" { @@ -297,17 +294,15 @@ func TestLargeDefs(t *testing.T) { t.Fatal(err) } - char := findChar(t, dir) - run := func(args ...string) string { return doRun(t, dir, args...) } run("go", "build", "cmd/pack") // writes pack binary to dir run("go", "tool", "compile", "large.go") - run("./pack", "grc", "large.a", "large."+char) + run("./pack", "grc", "large.a", "large.o") run("go", "tool", "compile", "-I", ".", "main.go") - run("go", "tool", "link", "-L", ".", "-o", "a.out", "main."+char) + run("go", "tool", "link", "-L", ".", "-o", "a.out", "main.o") out := run("./a.out") if out != "ok\n" { t.Fatalf("incorrect output: %q, want %q", out, "ok\n") @@ -325,20 +320,6 @@ func doRun(t *testing.T, dir string, args ...string) string { return string(out) } -// findChar returns the architecture character for the go command. -func findChar(t *testing.T, dir string) string { - out := doRun(t, dir, "go", "env") - re, err := regexp.Compile(`\s*GOCHAR=['"]?(\w)['"]?`) - if err != nil { - t.Fatal(err) - } - fields := re.FindStringSubmatch(out) - if fields == nil { - t.Fatal("cannot find GOCHAR in 'go env' output:\n", out) - } - return fields[1] -} - // Fake implementation of files. var helloFile = &FakeFile{ |