xref: /openbmc/google-ipmi-sys/test/meson.build (revision ff3cd8e91958cadd6a9f72f2ad69c00abae3c7cf)
1gtest = dependency('gtest', main: true, disabler: true, required: get_option('tests'))
2gmock = dependency('gmock', disabler: true, required: get_option('tests'))
3
4tests_pre = declare_dependency(
5  dependencies: [sys_dep, gtest, gmock])
6
7tests_lib = static_library(
8  'common',
9  'common.cpp',
10  'helper.cpp',
11  implicit_include_directories: false,
12  dependencies: tests_pre)
13
14tests_dep = declare_dependency(
15  link_with: tests_lib,
16  dependencies: tests_pre)
17
18tests = [
19  'cable',
20  'cpld',
21  'entity',
22  'eth',
23  'flash',
24  'handler',
25  'machine',
26  'pcie',
27  'poweroff',
28  'psu',
29]
30
31foreach t : tests
32  test(
33    t,
34    executable(
35      t.underscorify(),
36      t + '_unittest.cpp',
37      implicit_include_directories: false,
38      dependencies: tests_dep))
39endforeach
40