blob: f7e3bb95be0c73de19d7ee7bb90685d4f2130541 [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',
Hao Zhou15d4d212023-07-11 20:18:04 +000033 'bm_mode_transition',
Brandon Kim559cb012024-05-03 09:12:07 +000034 'bm_instance',
William A. Kennington IIIac730af2021-06-24 03:15:38 -070035]
36
37foreach t : tests
38 test(
39 t,
40 executable(
41 t.underscorify(),
42 t + '_unittest.cpp',
43 implicit_include_directories: false,
William A. Kennington III8d3d46a2021-07-13 12:35:35 -070044 dependencies: tests_dep))
William A. Kennington IIIac730af2021-06-24 03:15:38 -070045endforeach