blob: 6630893b54372111d00291cb2533c91545124aa3 [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',
10 implicit_include_directories: false,
11 dependencies: tests_pre)
12
13tests_dep = declare_dependency(
14 link_with: tests_lib,
15 dependencies: tests_pre)
16
William A. Kennington IIIac730af2021-06-24 03:15:38 -070017tests = [
18 'cable',
19 'cpld',
20 'entity',
21 'eth',
22 'flash',
23 'handler',
24 'machine',
25 'pcie',
26 'poweroff',
27 'psu',
28]
29
30foreach t : tests
31 test(
32 t,
33 executable(
34 t.underscorify(),
35 t + '_unittest.cpp',
36 implicit_include_directories: false,
William A. Kennington III8d3d46a2021-07-13 12:35:35 -070037 dependencies: tests_dep))
William A. Kennington IIIac730af2021-06-24 03:15:38 -070038endforeach