mirror of
https://github.com/golang/go
synced 2024-11-24 22:10:02 -07:00
ec0b8c0585
Currently, the top-level testsuite always uses whatever version of Go is found in the PATH to execute all the tests. This forces the developers to tweak the PATH to run the testsuite. Change it to use the same version of Go used to run run.go. This allows developers to run the testsuite using the tip compiler by simply saying "../bin/go run run.go". I think this is a better solution compared to always forcing "../bin/go", because it allows developers to run the testsuite using different Go versions, for instance to check if a new test is fixed in tip compared to the installed compiler. Fixes #24217 Change-Id: I41b299c753b6e77c41e28be9091b2b630efea9d2 Reviewed-on: https://go-review.googlesource.com/98439 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
577 B
577 B
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
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
gccgo
and other Go tool chains.