aboutsummaryrefslogtreecommitdiff
path: root/test cases/unit/39 python extmodule
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-09-12 13:38:36 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2018-09-16 15:07:43 +0300
commit3cf03ec6d603d2c4699cefb9fabdbd8de321a3f2 (patch)
treea7124115d8363911e16dc71e576d164bbda14d22 /test cases/unit/39 python extmodule
parent43268bfb79eca55d5d2bd6ff73abcadf9a77c60b (diff)
downloadmeson-3cf03ec6d603d2c4699cefb9fabdbd8de321a3f2.zip
meson-3cf03ec6d603d2c4699cefb9fabdbd8de321a3f2.tar.gz
meson-3cf03ec6d603d2c4699cefb9fabdbd8de321a3f2.tar.bz2
find_installation: Add support for feature option in required kwarg
Closes: #4165.
Diffstat (limited to 'test cases/unit/39 python extmodule')
-rw-r--r--test cases/unit/39 python extmodule/meson.build3
-rw-r--r--test cases/unit/39 python extmodule/meson_options.txt1
2 files changed, 4 insertions, 0 deletions
diff --git a/test cases/unit/39 python extmodule/meson.build b/test cases/unit/39 python extmodule/meson.build
index 4798654..eb00a6a 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 b8f645d..c85110d 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')