173da6906SKrzysztof Grobelnygtest_dep = dependency('gtest', main: true, disabler: true, required: false) 273da6906SKrzysztof Grobelnygmock_dep = dependency('gmock', disabler: true, required: false) 373da6906SKrzysztof Grobelnyif not gtest_dep.found() or not gmock_dep.found() 473da6906SKrzysztof Grobelny gtest_proj = import('cmake').subproject('googletest', required: false) 573da6906SKrzysztof Grobelny if gtest_proj.found() 673da6906SKrzysztof Grobelny gtest_dep = declare_dependency( 773da6906SKrzysztof Grobelny dependencies: [ 873da6906SKrzysztof Grobelny dependency('threads'), 9b5645947SKrzysztof Grobelny gtest_proj.dependency('gtest') 1073da6906SKrzysztof Grobelny ] 1173da6906SKrzysztof Grobelny ) 1273da6906SKrzysztof Grobelny gmock_dep = gtest_proj.dependency('gmock') 1373da6906SKrzysztof Grobelny else 1473da6906SKrzysztof Grobelny assert( 1573da6906SKrzysztof Grobelny not get_option('tests').enabled(), 1673da6906SKrzysztof Grobelny 'Googletest is required if tests are enabled' 1773da6906SKrzysztof Grobelny ) 1873da6906SKrzysztof Grobelny endif 1973da6906SKrzysztof Grobelnyendif 2073da6906SKrzysztof Grobelny 2173da6906SKrzysztof Grobelnytest( 2273da6906SKrzysztof Grobelny 'telemetry-ut', 2373da6906SKrzysztof Grobelny executable( 2473da6906SKrzysztof Grobelny 'telemetry-ut', 2573da6906SKrzysztof Grobelny [ 2673da6906SKrzysztof Grobelny '../src/persistent_json_storage.cpp', 277f06f613SKrzysztof Grobelny '../src/report.cpp', 28*2f9f9b87SWludzik, Jozef '../src/report_factory.cpp', 297f06f613SKrzysztof Grobelny '../src/report_manager.cpp', 30b5645947SKrzysztof Grobelny '../src/sensor.cpp', 317f06f613SKrzysztof Grobelny '../src/sensor_cache.cpp', 32b5645947SKrzysztof Grobelny 'src/dbus_environment.cpp', 33b5645947SKrzysztof Grobelny 'src/main.cpp', 34b5645947SKrzysztof Grobelny 'src/stubs/dbus_sensor_object.cpp', 35b5645947SKrzysztof Grobelny 'src/test_detached_timer.cpp', 3673da6906SKrzysztof Grobelny 'src/test_persistent_json_storage.cpp', 37*2f9f9b87SWludzik, Jozef 'src/test_report.cpp', 38*2f9f9b87SWludzik, Jozef 'src/test_report_manager.cpp', 39b5645947SKrzysztof Grobelny 'src/test_sensor.cpp', 407f06f613SKrzysztof Grobelny 'src/test_sensor_cache.cpp', 41b5645947SKrzysztof Grobelny 'src/test_unique_call.cpp', 427f06f613SKrzysztof Grobelny 'src/utils/generate_unique_mock_id.cpp', 4373da6906SKrzysztof Grobelny ], 4473da6906SKrzysztof Grobelny dependencies: [ 4573da6906SKrzysztof Grobelny boost, 4673da6906SKrzysztof Grobelny gmock_dep, 4773da6906SKrzysztof Grobelny gtest_dep, 4873da6906SKrzysztof Grobelny nlohmann_json, 4973da6906SKrzysztof Grobelny phosphor_logging, 5073da6906SKrzysztof Grobelny sdbusplus, 5173da6906SKrzysztof Grobelny ], 527f06f613SKrzysztof Grobelny include_directories: ['../src', 'src'] 5373da6906SKrzysztof Grobelny ) 5473da6906SKrzysztof Grobelny) 55