Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame^] | 1 | gtest_dep = dependency('gtest', main: false, required: false, version: '>=1.11.0') |
| 2 | gmock_dep = dependency('gmock', required: false, version: '>=1.11.0') |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 3 | if not gtest_dep.found() or not gmock_dep.found() |
Wludzik, Jozef | 596a994 | 2021-01-27 12:28:59 +0100 | [diff] [blame] | 4 | gtest_proj = import('cmake').subproject('googletest') |
| 5 | gtest_dep = gtest_proj.dependency('gtest') |
| 6 | gmock_dep = gtest_proj.dependency('gmock') |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 7 | endif |
| 8 | |
| 9 | test( |
| 10 | 'telemetry-ut', |
| 11 | executable( |
| 12 | 'telemetry-ut', |
| 13 | [ |
Krzysztof Grobelny | 8069771 | 2021-03-04 09:49:27 +0000 | [diff] [blame] | 14 | '../src/details/collection_function.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 15 | '../src/discrete_threshold.cpp', |
Krzysztof Grobelny | c8e3a64 | 2020-10-23 12:29:16 +0200 | [diff] [blame] | 16 | '../src/metric.cpp', |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 17 | '../src/numeric_threshold.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 18 | '../src/on_change_threshold.cpp', |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 19 | '../src/persistent_json_storage.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 20 | '../src/report.cpp', |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 21 | '../src/report_factory.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 22 | '../src/report_manager.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 23 | '../src/sensor.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 24 | '../src/sensor_cache.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 25 | '../src/trigger.cpp', |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 26 | '../src/trigger_actions.cpp', |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 27 | '../src/trigger_factory.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 28 | '../src/trigger_manager.cpp', |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 29 | '../src/types/report_types.cpp', |
Cezary Zwolak | 4416fce | 2021-03-17 03:21:06 +0100 | [diff] [blame] | 30 | '../src/utils/conversion_trigger.cpp', |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 31 | '../src/utils/generate_id.cpp', |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame^] | 32 | '../src/utils/messanger_service.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 33 | 'src/dbus_environment.cpp', |
| 34 | 'src/main.cpp', |
| 35 | 'src/stubs/dbus_sensor_object.cpp', |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 36 | 'src/test_conversion.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 37 | 'src/test_detached_timer.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 38 | 'src/test_discrete_threshold.cpp', |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 39 | 'src/test_generate_id.cpp', |
Krzysztof Grobelny | c8e3a64 | 2020-10-23 12:29:16 +0200 | [diff] [blame] | 40 | 'src/test_metric.cpp', |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 41 | 'src/test_numeric_threshold.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 42 | 'src/test_on_change_threshold.cpp', |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 43 | 'src/test_persistent_json_storage.cpp', |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 44 | 'src/test_report.cpp', |
| 45 | 'src/test_report_manager.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 46 | 'src/test_sensor.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 47 | 'src/test_sensor_cache.cpp', |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 48 | 'src/test_transform.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 49 | 'src/test_trigger.cpp', |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 50 | 'src/test_trigger_actions.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 51 | 'src/test_trigger_manager.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 52 | 'src/test_unique_call.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 53 | 'src/utils/generate_unique_mock_id.cpp', |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 54 | ], |
| 55 | dependencies: [ |
| 56 | boost, |
| 57 | gmock_dep, |
| 58 | gtest_dep, |
| 59 | nlohmann_json, |
| 60 | phosphor_logging, |
| 61 | sdbusplus, |
| 62 | ], |
Lukasz Kazmierczak | a74e44f | 2021-07-23 15:02:20 +0200 | [diff] [blame] | 63 | include_directories: ['../src', 'src'], |
| 64 | cpp_args: '-fno-lto' |
Krzysztof Grobelny | 6ccfcbf | 2020-11-04 09:31:36 +0100 | [diff] [blame] | 65 | ), |
| 66 | timeout: 120, |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 67 | ) |