coverexec

command
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Command coverexec runs one test binary for make test (go test -exec), moving its coverage output into a directory of its own under the one -test.gocoverdir names. make test then merges those directories.

Role

Command, with the repository tooling under tools/: not part of the server binary, and it keeps its path through the modular-monolith migration. The Makefile's test, accept-go and conan-accept targets build and use it.

Inputs

The test binary and its arguments, as go test -exec passes them:

coverexec <test binary> [args...]

Outputs

  • The test binary's own exit status and output.
  • Its coverage files in a new directory inside the one the last -test.gocoverdir argument names; arguments without that flag pass through unchanged.

Invariants

Test binaries built with -coverpkg=<module>/... that link the same instrumented packages write the same covmeta.<hash> file name. In one shared directory, two that finish together each rename a temporary file onto that name (internal/coverage/cfile, emitMetaDataFile), and Windows refuses the second rename with "Access is denied" (issue 368).

References

Status

Implemented P7 (issue 368).

Jump to

Keyboard shortcuts

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