xref: /openbmc/phosphor-time-manager/test/meson.build (revision 76ca53e6b690a5808b4d572060396fa76c14f27c)
1#################################################################################
2# Enforce the test dependencies when tests are enabled
3gtest = dependency(
4    'gtest',
5    main: true,
6    disabler: true,
7    required: get_option('tests'),
8)
9gmock = dependency('gmock', required: get_option('tests'))
10
11##################################################################################
12# declare the test sources
13test_list = [
14    'TestBmcEpoch.cpp',
15    'TestManager.cpp',
16    'TestUtils.cpp',
17    'mocked_property_change_listener.hpp',
18]
19
20###################################################################################
21# Run the tests
22foreach tests : test_list
23    test_name = tests.split('.')[0]
24    test(
25        test_name,
26        executable(
27            test_name,
28            tests,
29            include_directories: ['.', '../'],
30            link_with: libtimemanager,
31            dependencies: [gtest, gmock] + deps,
32        ),
33    )
34endforeach
35
36