compile: Add meson build support
Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I71c0e2a62b4bd9b97cbe9a87788a0569f74847a0
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 0000000..66a964c
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,26 @@
+gtest = dependency('gtest', main: true, disabler: true, required: get_option('tests'))
+gmock = dependency('gmock', disabler: true, required: get_option('tests'))
+
+test_dep = declare_dependency(
+ include_directories: include_directories('.'),
+ dependencies: [gtest, gmock])
+
+tests = [
+ 'parse_config_unittest',
+ 'sys_file_unittest',
+ 'handler_unittest',
+ 'handler_open_unittest',
+ 'handler_readwrite_unittest',
+ 'handler_commit_unittest',
+ 'handler_stat_unittest',
+]
+
+foreach t : tests
+ test(
+ t,
+ executable(
+ t.underscorify(),
+ t + '.cpp',
+ implicit_include_directories: false,
+ dependencies: [binarystoreblob_dep, test_dep]))
+endforeach