Skip to main content

expected_skip_reason

Function expected_skip_reason 

Source
pub fn expected_skip_reason(
    suite: &TestSuiteFixture,
    test: &TestCaseFixture,
    properties: RunProperties,
) -> Option<SkipReason>
Expand description

Determines the reason a test should be skipped.

The general algorithm is:

  • If the suite is not part of the run, produce SuiteNotInRun.
  • If this is a benchmark run and the test is not a benchmark, produce NotBenchmark.
  • Otherwise, check that the test is filtered out.
  • Otherwise, check that the test is ignored.
  • Otherwise, produce None.

This assigns every skip reason that is derivable from the fixture model and the run properties. The verifier in the integration-tests crate assigns the rest: RerunAlreadyPassed depends on the outcome of a prior run, and the not-in-name-list Filtered case depends on the name set a specific check was asked to verify.