Ratan Gupta | 8af2a89 | 2021-02-02 05:48:18 -0600 | [diff] [blame] | 1 | ################################################################################# |
| 2 | # Enforce the test dependencies when tests are enabled |
| 3 | gtest = dependency('gtest', main: true, disabler: true,required : get_option('tests')) |
| 4 | gmock = dependency('gmock',required : get_option('tests')) |
| 5 | |
| 6 | ################################################################################## |
| 7 | # declare the test sources |
| 8 | test_list = [ |
| 9 | 'TestBmcEpoch.cpp', |
| 10 | 'TestManager.cpp', |
| 11 | 'TestUtils.cpp', |
| 12 | 'mocked_property_change_listener.hpp', |
| 13 | ] |
| 14 | |
| 15 | ################################################################################### |
| 16 | # Run the tests |
| 17 | foreach tests:test_list |
| 18 | test_name = tests.split('.')[0] |
| 19 | test(test_name, |
| 20 | executable(test_name,tests, |
| 21 | include_directories : ['.','../'], |
| 22 | link_with : libtimemanager, |
| 23 | dependencies : [ gtest, |
| 24 | gmock, |
| 25 | ] + deps)) |
| 26 | endforeach |
| 27 | |