Skip to content

Commit

Permalink
build/tests: Check for python found and version in single require call
Browse files Browse the repository at this point in the history
We can only use the python object if it was found and the arguments for
require are all evaluated, even if the resulting feature is disabled.

Fixes: 1c6dd18 ("tests: Check for required WAV decoder for notification tests")
Closes: flatpak#1547
  • Loading branch information
swick committed Dec 23, 2024
1 parent 4e1e61f commit 542d509
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ python = pymod.find_installation(

enable_pytest = get_option('pytest') \
.require(pytest.found()) \
.require(python.found()) \
.require(python.language_version().version_compare('>=3.9'),
.require(python.found() and python.language_version().version_compare('>=3.9'),
error_message: 'Python version >=3.9 is required') \
.require(umockdev_dep.found()) \
.require(have_wav_parse,
Expand Down

0 comments on commit 542d509

Please sign in to comment.