buildtesting

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package buildtesting provides a pool of Go build environments for use in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prepare

func Prepare(t *testing.T, main string) string

Prepare a new test environment, returning the path.

func Run

func Run(m *testing.M)

Run should be called from TestMain.

func TestMain(m *testing.M) { buildtesting.Run(m) }`)

Then use Get() to retrieve the pool.

Types

type Env

type Env struct {
	// contains filtered or unexported fields
}

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

func (*Pool) Prepare

func (p *Pool) Prepare(t *testing.T, main string) string

Prepare a new test environment, returning the path.

When the test completes the environment will be returned to the pool.

Jump to

Keyboard shortcuts

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