Add initial unit tests
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: Id4850e52073ea6780a978c6cd5a5c439aa8ed846
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 0000000..f2534f3
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,24 @@
+gtest = dependency('gtest', main: true, disabler: true, required: build_tests)
+gmock = dependency('gmock', disabler: true, required: build_tests)
+
+configure_file(output: 'config.h',
+ configuration: cdata,
+)
+test_inc = include_directories('.')
+
+test_inspur_ipmi_oem = executable(
+ 'test_inspur-ipmi-oem',
+ '../src/inspur_oem.cpp',
+ 'test_inspur_ipmi_oem.cpp',
+ 'mocked_utils.cpp',
+ 'mocked_sdbus.cpp',
+ include_directories: [test_inc, src_inc],
+ dependencies: [
+ gtest,
+ gmock,
+ phosphor_logging,
+ phosphor_dbus_interfaces,
+ sdbusplus,
+ ])
+
+test('test_inspur-ipmi-oem', test_inspur_ipmi_oem)