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: #1547
  • Loading branch information
swick authored and GeorgesStavracas committed Jan 7, 2025
1 parent 6280d08 commit cb16d56
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 @@ -275,8 +275,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 cb16d56

Please sign in to comment.