Documentation
¶
Index ¶
Constants ¶
const ( DefaultCoverFile = coverage.DefaultCoverFile CoverLine = coverage.ModeLine CoverFunc = coverage.ModeFunc CoverFile = coverage.ModeFile )
The coverage vocabulary is the runner's; these names are what the test command's own code reads, so the two spell the same thing.
const ( // CacheOff gives every fixture run its own caches and drops the runtime // after it. Nothing one run parsed is visible to the next, so a run is // charged the parsing its own includes cost - and what it held is returned // when it ends rather than kept for the length of the suite. CacheOff = "off" // CacheWorker gives each worker one set, reused by the fixtures that // worker runs serially. What is held scales with --parallel rather than // with the number of fixtures. CacheWorker = "worker" )
The --cache modes, which say how far a parsed include and a compiled expression travel.
There is no "shared" mode because a worker loop already is one: run without --parallel there is a single worker, so a single set of caches serves the whole run. Sharing them across workers on top of that only adds contention for a hit the worker's own cache already has.
const Name = "Run .phpt test fixtures"
Name is the command title.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand creates a new test command.
Types ¶
type Options ¶
type Options struct {
Include string
JSON bool
Matrix bool
Verbose bool
Parallel int
Count int
Time time.Duration
Profile bool
Output string
Cover string
CoverFile string
Split bool
SkipPHP bool
Cache string
// Config is what the run started with: the embedded defaults, with the
// file -f named read over them. A phpscript.yml discovered in the fixture
// tree is read over this one in turn.
Config config.Config
// contains filtered or unexported fields
}
Options holds CLI flag options for the test command. Include, Verbose, Cover and CoverFile are the shared flags, copied off internal/flags before the run so the report writers keep taking one struct.