blob: 061b352547819a07fb59854f67a4c99679e299bb [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(
Brandon Kim93a4c0a2024-08-17 00:36:55 +00005 dependencies: [sys_dep, gtest, gmock, dependency('stdplus-gtest')])
William A. Kennington III8d3d46a2021-07-13 12:35:35 -07006
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',
Brandon Kim93a4c0a2024-08-17 00:36:55 +000035 'bios_setting',
William A. Kennington IIIac730af2021-06-24 03:15:38 -070036]
37
38foreach t : tests
39 test(
40 t,
41 executable(
42 t.underscorify(),
43 t + '_unittest.cpp',
44 implicit_include_directories: false,
William A. Kennington III8d3d46a2021-07-13 12:35:35 -070045 dependencies: tests_dep))
William A. Kennington IIIac730af2021-06-24 03:15:38 -070046endforeach