blob: 7fa06c422bbfb56968b8a88c88efd8f318d0da36 [file] [log] [blame]
William A. Kennington IIIac730af2021-06-24 03:15:38 -07001gtest = dependency('gtest', main: true, disabler: true, required: get_option('tests'))
2gmock = dependency('gmock', disabler: true, required: get_option('tests'))
3
William A. Kennington III8d3d46a2021-07-13 12:35:35 -07004tests_pre = declare_dependency(
5 dependencies: [sys_dep, gtest, gmock])
6
7tests_lib = static_library(
8 'common',
9 'common.cpp',
Willy Tuff3cd8e2021-09-14 22:49:55 -070010 'helper.cpp',
William A. Kennington III8d3d46a2021-07-13 12:35:35 -070011 implicit_include_directories: false,
12 dependencies: tests_pre)
13
14tests_dep = declare_dependency(
15 link_with: tests_lib,
16 dependencies: tests_pre)
17
William A. Kennington IIIac730af2021-06-24 03:15:38 -070018tests = [
19 'cable',
20 'cpld',
21 'entity',
22 'eth',
23 'flash',
Steve Foreman4f0d1de2021-09-20 14:06:32 -070024 'google_accel_oob',
William A. Kennington IIIac730af2021-06-24 03:15:38 -070025 'handler',
26 'machine',
27 'pcie',
28 'poweroff',
29 'psu',
Willy Tu6c71b0f2021-10-10 13:34:41 -070030 'pcie_bifurcation',
Nikhil Namjoshi5e70dc82022-09-16 00:36:07 +000031 'bmc_mode',
John Wediga92d0e62023-06-29 10:43:47 -070032 'linux_boot_done',
William A. Kennington IIIac730af2021-06-24 03:15:38 -070033]
34
35foreach t : tests
36 test(
37 t,
38 executable(
39 t.underscorify(),
40 t + '_unittest.cpp',
41 implicit_include_directories: false,
William A. Kennington III8d3d46a2021-07-13 12:35:35 -070042 dependencies: tests_dep))
William A. Kennington IIIac730af2021-06-24 03:15:38 -070043endforeach