mirror of
https://github.com/golang/go.git
synced 2026-04-02 09:20:29 +09:00
CL 391014 requires the compiler to be invoked with the -p flag, to specify the package path. Later, CL 394217 makes the compiler to produce an unlinkable object file, so "go tool compile x.go" can still be used on the command line. This CL does the same for the assembler, requiring -p, otherwise generating an unlinkable object. No special case for the main package, as the main package cannot be only assembly code, and there is no way to tell if it is the main package from an assembly file. Now we guarantee that we always have an expanded package path in the object file. A later CL will delete the name expansion code in the linker. Change-Id: I8c10661aaea2ff794614924ead958d80e7e2487d Reviewed-on: https://go-review.googlesource.com/c/go/+/404298 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
The test directory contains tests of the Go tool chain and runtime. It includes black box tests, regression tests, and error output tests. They are run as part of all.bash.
To run just these tests, execute:
../bin/go run run.go
To run just tests from specified files in this directory, execute:
../bin/go run run.go -- file1.go file2.go ...
Standard library tests should be written as regular Go tests in the appropriate package.
The tool chain and runtime also have regular Go tests in their packages. The main reasons to add a new test to this directory are:
- it is most naturally expressed using the test runner; or
- it is also applicable to
gccgoand other Go tool chains.