Enable Meson Build system for phoshphor-time-manager
- This commit enables the meson build system for the
phoshphor-time-manager repo.
Tested By:
- Code compiles both in arm & x86 sdks without errors or warnings.
- All the unit test cases are getting passed.
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Change-Id: I311bf33f34c6c71860e9c845b6ca3c591af8fa6a
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 0000000..e43a27b
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,27 @@
+#################################################################################
+# Enforce the test dependencies when tests are enabled
+gtest = dependency('gtest', main: true, disabler: true,required : get_option('tests'))
+gmock = dependency('gmock',required : get_option('tests'))
+
+##################################################################################
+# declare the test sources
+test_list = [
+ 'TestBmcEpoch.cpp',
+ 'TestManager.cpp',
+ 'TestUtils.cpp',
+ 'mocked_property_change_listener.hpp',
+]
+
+###################################################################################
+# Run the tests
+foreach tests:test_list
+ test_name = tests.split('.')[0]
+ test(test_name,
+ executable(test_name,tests,
+ include_directories : ['.','../'],
+ link_with : libtimemanager,
+ dependencies : [ gtest,
+ gmock,
+ ] + deps))
+endforeach
+