buildtest

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Hold(family string) (*Dir, error)

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

func (d *Dir) Build(args ...string) error

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.

func (*Dir) Path

func (d *Dir) Path() string

Path is the directory the binaries are built into.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL