Skip to content

Fixture-gated tests can vanish silently, same failure mode as #55 #58

Description

@kmatzen

tests/test_video_reader.cpp guards test cases on fixture availability:

#ifdef HAVE_SEEK_FIXTURE
...
#endif
#ifdef HAVE_HDR_FIXTURE
...
#endif

and CMakeLists.txt only defines those when the corresponding ffmpeg invocation at configure time returns 0. If the encode fails — libx265 absent, a filter unavailable in that ffmpeg build, a syntax change in a future ffmpeg — the tests are compiled out and the suite reports success with fewer cases than the author intended.

That is structurally the same problem as #55: a green result that quietly means less than it appears to. #55 was "zero tests ran"; this is "an unknown subset ran".

Currently benign — I checked the CI logs for #51 and neither the seek fixture could not be generated nor the libx265 not available message appears, so both fixtures do build on Linux and macOS today. The concern is that nothing would tell us if that stopped being true.

Options, roughly in order of cost:

  1. Print the fixture status positively at configure time (-- seek fixture: enabled) so the log states what is covered rather than only what is missing.
  2. Assert a minimum test count in CI: framewright_tests --list-tests | wc -l, compared against an expected number, or Catch2's --warn NoTests.
  3. Make fixture generation a hard failure on platforms where the codec is expected to be present, and keep the graceful skip only for genuinely optional ones like HDR/libx265.

(3) is the strongest but needs a decision about which fixtures are mandatory. (1) is nearly free and would at least make the gap visible to anyone reading the log.

Found while verifying that the new [seek] cases from #51 actually execute in CI — the suite finished in 0.94s, which was fast enough to be worth confirming they had not been skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions