aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2021-07-29 23:27:11 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-09-07 10:55:43 +0000
commit77d1c243614d385027ca11f75aa5d688b01c2969 (patch)
treedc39670de7b80b887f539480153334c25ea75e88 /src/tests
parentfa19b2b9b1412d3eeb515afe41c55ac414acc982 (diff)
build: Port to meson
meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/meson.build38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/tests/meson.build b/src/tests/meson.build
new file mode 100644
index 00000000..c059ae2d
--- /dev/null
+++ b/src/tests/meson.build
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (C) 2021 Iñigo Martinez <inigomartinez@gmail.com>
+
+test_units = {
+ 'at-serial-port': libport_dep,
+ 'charsets': libhelpers_dep,
+ 'error-helpers': libhelpers_dep,
+ 'modem-helpers': libhelpers_dep,
+ 'sms-part-3gpp': libhelpers_dep,
+ 'sms-part-cdma': libhelpers_dep,
+ 'udev-rules': libkerneldevice_dep,
+}
+
+deps = [
+ libport_dep,
+ libqcdm_dep,
+ util_dep,
+]
+
+test_units += {'qcdm-serial-port': deps}
+
+if enable_qmi
+ test_units += {'modem-helpers-qmi': libkerneldevice_dep}
+endif
+
+foreach test_unit, test_deps: test_units
+ test_name = 'test-' + test_unit
+
+ exe = executable(
+ test_name,
+ sources: test_name + '.c',
+ include_directories: top_inc,
+ dependencies: test_deps,
+ c_args: '-DTESTUDEVRULESDIR="@0@"'.format(src_dir)
+ )
+
+ test(test_name, exe)
+endforeach