compiler

package
v1.0.14113-dc6ae63 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 3 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 compiler helps efficiently compile and cleanup your services in acceptance tests.

This is a small wrapper around the general releases/compiler. The binary created from this package will always be stored in a temporary folder.

To instrument a binary with coverage, the main entry point package must include a TestRunMain func (or similar )in a test file as per the example in internal/cmd/main_test.go. The work added to the compiler must set the WithCoverage flag to true.

For the resultant binary to produce a coverage report it needs to be called with these parameters: "-test.run", "^TestRunMain$", "-test.coverprofile", "your_coverage_name.out" and the service needs to be able to exit cleanly to flush the report. The helper function in testing/runner can make this easier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parallel

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

func NewParallel

func NewParallel(parallelism int) *Parallel

func (*Parallel) Add

func (t *Parallel) Add(work Work)

func (*Parallel) Cleanup

func (t *Parallel) Cleanup()

func (*Parallel) Dir

func (t *Parallel) Dir() string

func (*Parallel) Run

func (t *Parallel) Run(ctx context.Context) error

type Work

type Work = compiler.Work

Directories

Path Synopsis
internal
cmd command
cmd2 command

Jump to

Keyboard shortcuts

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