blob: d33febb1697d20ce4435f4c9cf8f7dcbbd1d24f3 [file] [log] [blame]
Ratan Gupta8af2a892021-02-02 05:48:18 -06001#################################################################################
2# Enforce the test dependencies when tests are enabled
Patrick Williams76ca53e2025-03-03 11:08:20 -05003gtest = dependency(
4 'gtest',
5 main: true,
6 disabler: true,
7 required: get_option('tests'),
8)
9gmock = dependency('gmock', required: get_option('tests'))
Ratan Gupta8af2a892021-02-02 05:48:18 -060010
11##################################################################################
12# declare the test sources
13test_list = [
Patrick Williams76ca53e2025-03-03 11:08:20 -050014 'TestBmcEpoch.cpp',
15 'TestManager.cpp',
16 'TestUtils.cpp',
17 'mocked_property_change_listener.hpp',
Ratan Gupta8af2a892021-02-02 05:48:18 -060018]
19
20###################################################################################
21# Run the tests
Patrick Williams76ca53e2025-03-03 11:08:20 -050022foreach 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 )
Ratan Gupta8af2a892021-02-02 05:48:18 -060034endforeach
35