Skip to content

skip some skippable tests #3102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 19, 2022
Merged

Conversation

eli-schwartz
Copy link
Contributor

There are two types of tests that are implemented here:

  • Some tests have an if block, and only run the entire test if some single prerequisite condition is available. This is a simple fix, because the tests are already skipped, but they don't say so. Make these exit 77 so they are marked as having been skipped.
  • Some tests use bc, and fail if that is not installed. Make this a bit nicer, and abort the test, marking it as skipped. Oftentimes, bc is not installed.

These functions currently exist in a sourced shell library, but there is
an identical copy of them in a single test file. Get rid of this
duplicate definition.
`exit 77` is the GNU exitcode protocol for tests that cannot be run
because their prerequisites are not available. If `bc` is not installed,
and it often isn't, the test can be short-circuited instead of failing;
meson will report them in "warning yellow".
Not all test cases can be cleanly marked as skipped -- sometimes,
multiple things are checked, and having one be unavailable should not
mean skipping all tests.

But in a couple cases, a test file only tests one thing, and that may be
skipped. In such cases, it can be semantically indicated in the test
harness report collection, that a skip occurred.
@eli-schwartz
Copy link
Contributor Author

Ref. #3099

@jcupitt
Copy link
Member

jcupitt commented Oct 19, 2022

Hi Eli, nice! Thanks for improving this.

These tests are a bit of a mess. They predate the python test suite and should perhaps be removed altogether. I think we kept them around mostly to exercise the libvips CLI.

@jcupitt jcupitt merged commit e73f003 into libvips:master Oct 19, 2022
@eli-schwartz eli-schwartz deleted the skippable-tests branch October 19, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants