build: Add meson build
This replicates most of the current autotools build.
Code coverage is omitted, it should be possible to use built-in
Meson functionality.
Valgrind for tests has not been added, instead it can run as
meson test --wrap='valgrind --leak-check=full --error-exitcode=1'
Change-Id: I5566a6c30630c486d22390e126899dbe4a6331ce
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..4ca52a0
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,28 @@
+
+tests = [
+ 'test_eid',
+ 'test_seq',
+ 'test_bridge',
+ 'test_cmds',
+ 'test_core',
+ ]
+
+if get_option('bindings').contains('serial')
+ tests += 'test_serial'
+endif
+if get_option('bindings').contains('astlpc')
+ tests += 'test_astlpc'
+endif
+
+test_include_dirs = [include_directories('.'), libmctp_include_dir]
+foreach t : tests
+ test(
+ t,
+ executable(
+ t,
+ [t + '.c', 'test-utils.c'],
+ include_directories: test_include_dirs,
+ dependencies: [libmctp_dep],
+ ),
+ )
+endforeach