Skip to content

Commit

Permalink
Add WithCoveredCommands alias
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Koch <[email protected]>
  • Loading branch information
hugelgupf committed Feb 16, 2024
1 parent e3faa6a commit 46ed0fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions uimage/uimage.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,14 @@ func WithBinaryCommandsOpts(gbOpts *golang.BuildOpts, cmd ...string) Modifier {
return WithCommands(gbOpts, builder.Binary, cmd...)
}

// WithCoveredCommands adds Go commands to compile as individual binaries with
// -cover and -covermode=atomic for integration test coverage.
//
// Allowed formats for cmd are documented in [WithCommands].
func WithCoveredCommands(cmd ...string) Modifier {
return WithCommands(&golang.BuildOpts{ExtraArgs: []string{"-cover", "covermode=atomic"}}, builder.Binary, cmd...)
}

// WithOutput sets the archive output file.
func WithOutput(w initramfs.WriteOpener) Modifier {
return func(o *Opts) error {
Expand Down

0 comments on commit 46ed0fc

Please sign in to comment.