[gnote/meson] Add gnote unit tests to meson build
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/meson] Add gnote unit tests to meson build
- Date: Mon, 5 Apr 2021 16:41:40 +0000 (UTC)
commit e0af3a1329758c2d9b86acda3230833697458c15
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Apr 5 19:41:27 2021 +0300
Add gnote unit tests to meson build
meson.build | 2 ++
src/meson.build | 3 +++
src/test/meson.build | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
---
diff --git a/meson.build b/meson.build
index b57fd57d..0d9d3651 100644
--- a/meson.build
+++ b/meson.build
@@ -26,6 +26,8 @@ if gspell.found()
add_project_arguments('-DENABLE_GSPELL=1', language: 'cpp')
endif
+unit_test_pp = dependency('UnitTest++', version: '>=1.5.1', required: false)
+
if get_option('buildtype').startswith('debug')
add_project_arguments('-DDEBUG', language: 'cpp')
endif
diff --git a/src/meson.build b/src/meson.build
index 74783dc1..70625c41 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -112,4 +112,7 @@ src_include_dir = include_directories('.')
subdir('plugins')
subdir('dbus')
+if unit_test_pp.found()
+ subdir('test')
+endif
diff --git a/src/test/meson.build b/src/test/meson.build
new file mode 100644
index 00000000..26f843de
--- /dev/null
+++ b/src/test/meson.build
@@ -0,0 +1,40 @@
+test_sources = [
+ 'runner.cpp',
+ 'testgnote.cpp',
+ 'testnote.cpp',
+ 'testnotemanager.cpp',
+ 'testsyncaddin.cpp',
+ 'testsyncclient.cpp',
+ 'testsyncmanager.cpp',
+ 'testtagmanager.cpp',
+ 'unit/datetimeutests.cpp',
+ 'unit/directorytests.cpp',
+ 'unit/filesutests.cpp',
+ 'unit/fileinfoutests.cpp',
+ 'unit/gnotesyncclientutests.cpp',
+ 'unit/noteutests.cpp',
+ 'unit/notemanagerutests.cpp',
+ 'unit/stringutests.cpp',
+ 'unit/syncmanagerutests.cpp',
+ 'unit/trieutests.cpp',
+ 'unit/uriutests.cpp',
+ 'unit/utiltests.cpp',
+ 'unit/xmlreaderutests.cpp',
+]
+
+extra_testee_sources = [
+ '../synchronization/gnotesyncclient.cpp',
+ '../synchronization/silentui.cpp',
+ '../synchronization/syncmanager.cpp',
+]
+
+gnoteunittests = executable(
+ 'gnoteunittests',
+ [test_sources, extra_testee_sources],
+ dependencies: [dependencies, unit_test_pp],
+ include_directories: [root_include_dir, src_include_dir],
+ link_with: libgnote_shared_lib,
+)
+
+test('gnote_unit_tests', gnoteunittests)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]