Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

generators/json

Generate a newline-delimited JSON report from result check outputs.

Prefer mkReport, which accepts checks in their natural shape; this generator takes the normalized form it produces.

Each line of the output is a JSON object with the following fields:

  • name: the attribute name of the check
  • suite: suite name, or null for flat checks
  • kind: the check type ("result", "snapshot", or "eval")
  • status: "pass", "fail", or "skip"
  • exitCode: the raw exit code string
  • stdout: captured stdout
  • stderr: captured stderr
  • drvPath: path to the check derivation in the Nix store

kind reflects passthru.kind on the result check derivation. status is "skip" when exitCode is empty (set by mkSkip).

Type

json :: AttrSet -> Derivation

Arguments

checks
Attribute set of { check, suite } pairs, keyed by entry key.

Example

pkgs.resultChecks.json.override { inherit checks; }