From 3cf03ec6d603d2c4699cefb9fabdbd8de321a3f2 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 12 Sep 2018 13:38:36 -0400 Subject: find_installation: Add support for feature option in required kwarg Closes: #4165. --- test cases/unit/39 python extmodule/meson.build | 3 +++ test cases/unit/39 python extmodule/meson_options.txt | 1 + 2 files changed, 4 insertions(+) (limited to 'test cases') diff --git a/test cases/unit/39 python extmodule/meson.build b/test cases/unit/39 python extmodule/meson.build index 479865482..eb00a6ae3 100644 --- a/test cases/unit/39 python extmodule/meson.build +++ b/test cases/unit/39 python extmodule/meson.build @@ -21,3 +21,6 @@ if py.found() else error('MESON_SKIP_TEST: Python not found, skipping test.') endif + +py = py_mod.find_installation(get_option('python'), required : get_option('disabled_opt')) +assert(not py.found(), 'find_installation not working with disabled feature') diff --git a/test cases/unit/39 python extmodule/meson_options.txt b/test cases/unit/39 python extmodule/meson_options.txt index b8f645d09..c85110d03 100644 --- a/test cases/unit/39 python extmodule/meson_options.txt +++ b/test cases/unit/39 python extmodule/meson_options.txt @@ -1,3 +1,4 @@ option('python', type: 'string', description: 'Name of or path to the python executable' ) +option('disabled_opt', type: 'feature', value: 'disabled') -- cgit v1.2.3