cmd

package
v0.0.0-...-64567a0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalFlags = []flag.Flag{
		flag.StringFlag{
			Name:  tagsFlagName,
			Usage: "Run tests that are part of the provided tags (use commas to separate multiple tags)",
		},
		flag.BoolFlag{
			Name:  verboseFlagName,
			Alias: verboseFlagAlias,
			Usage: "Enable verbose output for tests",
		},
		flag.BoolFlag{
			Name:  raceFlagName,
			Usage: "Enable race detector for tests",
		},
		flag.StringFlag{
			Name:  junitOutputPathFlagName,
			Usage: "Path to JUnit XML output (if provided, verbose flag is set to true)",
		},
	}
)
View Source
var Library = amalgomated.NewCmdLibrary(amalgomatedtesters.Instance())

Functions

func JUnitOutputPath

func JUnitOutputPath(ctx cli.Context) string

func PkgPaths

func PkgPaths(pkgPaths []string, wd string, exclude matcher.Matcher) ([]string, error)

PkgPaths returns a slice that contains the relative package paths for the packages "pkgPaths" relative to the project directory "wd" excluding any of the paths that match the provided "exclude" Matcher. If "pkgPaths" is an empty slice, then all of the packages in "wd" (except those that match the "exclude" matcher) are returned.

func Race

func Race(ctx cli.Context) bool

func Tags

func Tags(ctx cli.Context) []string

func TagsMatcher

func TagsMatcher(tags []string, cfg params.GUnit) (matcher.Matcher, error)

TagsMatcher returns a Matcher that matches all packages that are matched by the provided tags. If no tags are provided, returns nil. If the tags consist of a single tag named "all", the returned matcher matches the union of all known tags. If the tags consist of a single tag named "none", the returned matcher matches everything except the union of all known tags (untagged tests).

func Verbose

func Verbose(ctx cli.Context) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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