Skip to content

feat: warn when test results are older than the sources #488

Open

Description

@jimisola

Problem description

status reads whatever JUnit XML files match the configured test_results globs. If the build failed, or ran only part of the tests, the files from an earlier run are still on disk and status reports their results as current. A commit that does not compile can show every requirement as complete.

Desired solution

Warn when the test results are older than what they are meant to verify, and optionally fail:

  • Compare each result file's timestamp (the timestamp attribute of <testsuite>, or the file's modification time) with the newest source or reqstool file, or with a --results-since <time> given by the caller.
  • Report results that are older as outdated, and treat them as missing with an option such as --fail-on-outdated-results.
  • Show the age of the newest and oldest result file in the console output, so a stale run is visible at a glance.

Alternatives considered

  • Delete the results directory before each test run, or run status in the same CI job right after the tests: works in CI when everyone remembers to do it, but not for local runs.

Additional context

Applies to the post-build test results (--with-post-tests) in the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions