mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 03:35:38 +03:00
42 lines
1 KiB
Diff
42 lines
1 KiB
Diff
From b50b584a2703394be08a2ad245b813b268a8e1ed Mon Sep 17 00:00:00 2001
|
|
From: Philipp Zabel <philipp.zabel@gmail.com>
|
|
Date: Sun, 4 Aug 2019 22:28:37 +0200
|
|
Subject: [PATCH] meson: hook up unit tests
|
|
|
|
Build the unit tests and hook them up to the ninja test target.
|
|
---
|
|
meson.build | 24 ++++++++++++++++++++++++
|
|
1 file changed, 24 insertions(+)
|
|
|
|
diff --git a/meson.build b/meson.build
|
|
index 24198a4b..1e02bc10 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -223,3 +223,27 @@ pkg.generate(
|
|
url: 'http://www.openhmd.net/',
|
|
)
|
|
install_headers('include/openhmd.h', subdir: 'openhmd')
|
|
+
|
|
+
|
|
+#
|
|
+# Unit tests
|
|
+#
|
|
+
|
|
+unittests_sources = [
|
|
+ 'src/omath.c',
|
|
+ 'tests/unittests/highlevel.c',
|
|
+ 'tests/unittests/main.c',
|
|
+ 'tests/unittests/quat.c',
|
|
+ 'tests/unittests/tests.h',
|
|
+ 'tests/unittests/vec.c'
|
|
+]
|
|
+
|
|
+unittests = executable(
|
|
+ 'openhmd_unittests',
|
|
+ unittests_sources,
|
|
+ include_directories: include_directories('./include', './src'),
|
|
+ link_with: [openhmd_lib],
|
|
+ dependencies: [dep_libm, dep_threads]
|
|
+)
|
|
+
|
|
+test('unittests', unittests)
|