Documentation
¶
Overview ¶
Package buildtest builds commands of the lys source tree for the tests that run them as programs. Each test process builds into its own directory under the temporary directory, which it holds until it ends; the next process of the same family removes the directories of the processes that ended, so test runs leave no binaries behind.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
Dir is a directory of test binaries held by this process until it ends. The process keeps it reachable for as long as it runs the binaries, since the hold goes with it.
func Hold ¶
Hold makes a directory for this process's builds in the family's directory under the temporary directory, after removing the directories of the family's processes that ended.
func (*Dir) Build ¶
Build runs go build with args, packages of the module included, from the root of the source tree the test binary was built from, writing each command to the directory under its own name. Builds of the family run one at a time, so concurrent test processes share the go command's cache instead of compiling the same packages side by side. A failed build is an error carrying the go build output.