summaryrefslogtreecommitdiff
path: root/test cases/unit/37 python extmodule/meson.build
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-07-31 19:22:24 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-07-31 19:22:24 +0300
commit17bfbb99e5897ac759aca42d3ee375ebb33bd087 (patch)
tree8df2a3f7cbfcca9c30df15404f0227dfe0107705 /test cases/unit/37 python extmodule/meson.build
parent2bc0f56b21a6dd327a6907c5fe27885b05db49d5 (diff)
downloadmeson-17bfbb99e5897ac759aca42d3ee375ebb33bd087.tar.gz
Condense test dirs.
Diffstat (limited to 'test cases/unit/37 python extmodule/meson.build')
-rw-r--r--test cases/unit/37 python extmodule/meson.build23
1 files changed, 23 insertions, 0 deletions
diff --git a/test cases/unit/37 python extmodule/meson.build b/test cases/unit/37 python extmodule/meson.build
new file mode 100644
index 000000000..479865482
--- /dev/null
+++ b/test cases/unit/37 python extmodule/meson.build
@@ -0,0 +1,23 @@
+project('Python extension module', 'c',
+ default_options : ['buildtype=release'])
+
+py_mod = import('python')
+
+py = py_mod.find_installation(get_option('python'), required : false)
+
+if py.found()
+ py_dep = py.dependency()
+
+ if py_dep.found()
+ subdir('ext')
+
+ test('extmod',
+ py,
+ args : files('blaster.py'),
+ env : ['PYTHONPATH=' + pypathdir])
+ else
+ error('MESON_SKIP_TEST: Python libraries not found, skipping test.')
+ endif
+else
+ error('MESON_SKIP_TEST: Python not found, skipping test.')
+endif