[amtk/meson-msvc: 22/22] meson: Build the test programs in testsuite/



commit 935cd3131ee051e95f081a62e5e14dfb83ddef13
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri May 8 14:34:59 2020 +0800

    meson: Build the test programs in testsuite/
    
    This adds rules to build the test programs in testsuite/ and adds them to
    Meson's etst framework so that we can use commands like 'ninja test' or
    'meson test [test names]' to run these test programs.

 meson.build           |  1 +
 testsuite/meson.build | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
---
diff --git a/meson.build b/meson.build
index 4c7a871..4f6c453 100644
--- a/meson.build
+++ b/meson.build
@@ -14,3 +14,4 @@ pkg = import('pkgconfig')
 
 subdir('amtk')
 subdir('tests')
+subdir('testsuite')
diff --git a/testsuite/meson.build b/testsuite/meson.build
new file mode 100644
index 0000000..cb995b5
--- /dev/null
+++ b/testsuite/meson.build
@@ -0,0 +1,14 @@
+unit_tests = [
+  'test-action-info-store',
+  'test-action-map',
+  'test-utils',
+]
+
+foreach test_name : unit_tests
+  test_exe = executable(
+    test_name,
+    test_name + '.c',
+    dependencies: AMTK_DEP,
+  )
+  test(test_name, test_exe)
+endforeach


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]