xref: /openbmc/phosphor-power/phosphor-regulators/test/meson.build (revision 5b27a95bec8bdcd84728fbf3415e1760aa95ebe5)
1phosphor_regulators_tests_include_directories = include_directories(
2    '.',
3    'actions'
4)
5
6phosphor_regulators_tests_source_files = [
7    'device_tests.cpp',
8    'id_map_tests.cpp',
9    'rail_tests.cpp',
10    'rule_tests.cpp',
11
12    'actions/action_environment_tests.cpp',
13    'actions/action_error_tests.cpp',
14    'actions/action_utils_tests.cpp',
15    'actions/and_action_tests.cpp',
16    'actions/i2c_action_tests.cpp',
17    'actions/i2c_compare_bit_action_tests.cpp',
18    'actions/i2c_compare_byte_action_tests.cpp',
19    'actions/i2c_compare_bytes_action_tests.cpp',
20    'actions/i2c_write_bit_action_tests.cpp',
21    'actions/i2c_write_byte_action_tests.cpp',
22    'actions/i2c_write_bytes_action_tests.cpp',
23    'actions/if_action_tests.cpp',
24    'actions/not_action_tests.cpp',
25    'actions/or_action_tests.cpp',
26    'actions/run_rule_action_tests.cpp',
27    'actions/set_device_action_tests.cpp'
28]
29
30test('phosphor-regulators-tests',
31     executable('phosphor-regulators-tests',
32                phosphor_regulators_tests_source_files,
33                dependencies: [
34                    gmock,
35                    gtest,
36                ],
37                link_args: dynamic_linker,
38                build_rpath: get_option('oe-sdk').enabled() ? rpath : '',
39                link_with: [
40                    phosphor_regulators_library,
41                    libi2c_dev_mock
42                ],
43                implicit_include_directories: false,
44                include_directories: [
45                    phosphor_regulators_include_directories,
46                    phosphor_regulators_tests_include_directories,
47                    libi2c_inc,
48                    libi2c_dev_mock_inc
49                ]
50     )
51)
52