mix statifier.corpus (Statifier v2.6.0)

Copy Markdown View Source

Emits the conformance corpus under conformance/ from the fetched upstream suites, or checks the committed one (ADR-0070). Mix.Statifier.Corpus.Emitter holds the rules; this task is its command line.

Usage

# Run every upstream case and write conformance/corpus/, manifest.json,
# exclusions.json and registry.json
mix statifier.corpus

# Write nothing; fail if a committed file differs from what the emitter
# would write, or if there is nothing to check
mix statifier.corpus --check

Options

  • --check - check instead of emitting
  • --scratch - the upstream tree, defaults to tools/corpus/scratch

Emitting needs the upstream tree that mise run corpus:fetch and mise run corpus:transform populate, and refuses without it; the task never fetches. --check needs neither the network nor that tree: it re-runs every committed case and recomputes every file derivable from the committed inputs, and compares the corpus against the upstream tree only when the tree is present, saying so when it is not.

Both modes start the application and place Statifier.Supervisor, the session runtime, as the test suite does (ADR-0027: the library starts no processes of its own), because a case that uses <send>, <invoke> or a delay runs through a session. Every refusal is printed as a sentence and exits non-zero.

Summary

Functions

Runs the task and reports the outcome instead of raising.

Functions

execute(argv, opts \\ [])

@spec execute(argv :: [String.t()], opts :: keyword()) :: :ok | {:error, String.t()}

Runs the task and reports the outcome instead of raising.

opts[:root] moves the whole project root - the exclusion lists, the ratchet and conformance/ - to a fixture tree, so the tests can drive the task without touching the repository's own files.