summaryrefslogtreecommitdiff
path: root/test/py/meson.build
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2022-05-09 13:10:22 +0300
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-05-10 13:53:43 +0200
commit06cb7130c4fadac3bde6e695b0a6842656c9a5d4 (patch)
treed2d69a17e99c51ab496a9e804ecaf60ac64dfbb9 /test/py/meson.build
parent6e92cb9dc49e0bdd7b909f3da72c6032bcaa2c42 (diff)
py: Add unittests.py
Add a simple unittests.py as a base for python unittests. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/py/meson.build')
-rw-r--r--test/py/meson.build17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/py/meson.build b/test/py/meson.build
new file mode 100644
index 00000000..2affdbd4
--- /dev/null
+++ b/test/py/meson.build
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: CC0-1.0
+
+if not pycamera_enabled
+ subdir_done()
+endif
+
+pymod = import('python')
+py3 = pymod.find_installation('python3')
+
+pypathdir = meson.project_build_root() / 'src' / 'py'
+
+test('pyunittests',
+ py3,
+ args : files('unittests.py'),
+ env : ['PYTHONPATH=' + pypathdir],
+ suite : 'pybindings',
+ is_parallel : false)