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 | [ |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 14 | '../src/discrete_threshold.cpp', |
Krzysztof Grobelny | c8e3a64 | 2020-10-23 12:29:16 +0200 | [diff] [blame] | 15 | '../src/metric.cpp', |
Krzysztof Grobelny | f7ea299 | 2022-01-27 11:04:58 +0100 | [diff] [blame] | 16 | '../src/metrics/collection_data.cpp', |
| 17 | '../src/metrics/collection_function.cpp', |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 18 | '../src/numeric_threshold.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 19 | '../src/on_change_threshold.cpp', |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 20 | '../src/persistent_json_storage.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 21 | '../src/report.cpp', |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 22 | '../src/report_factory.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 23 | '../src/report_manager.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 24 | '../src/sensor.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 25 | '../src/sensor_cache.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 26 | '../src/trigger.cpp', |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 27 | '../src/trigger_actions.cpp', |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 28 | '../src/trigger_factory.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 29 | '../src/trigger_manager.cpp', |
Krzysztof Grobelny | 493e62e | 2022-02-14 10:55:50 +0100 | [diff] [blame] | 30 | '../src/types/readings.cpp', |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 31 | '../src/types/report_types.cpp', |
Cezary Zwolak | 4416fce | 2021-03-17 03:21:06 +0100 | [diff] [blame] | 32 | '../src/utils/conversion_trigger.cpp', |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 33 | '../src/utils/generate_id.cpp', |
Krzysztof Grobelny | e6d4887 | 2022-02-08 13:41:30 +0100 | [diff] [blame] | 34 | '../src/utils/messanger_service.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 35 | 'src/dbus_environment.cpp', |
| 36 | 'src/main.cpp', |
| 37 | 'src/stubs/dbus_sensor_object.cpp', |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 38 | 'src/test_conversion.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 39 | 'src/test_detached_timer.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 40 | 'src/test_discrete_threshold.cpp', |
Krzysztof Grobelny | f7ea299 | 2022-01-27 11:04:58 +0100 | [diff] [blame] | 41 | 'src/test_ensure.cpp', |
Krzysztof Grobelny | b8cc78d | 2021-11-29 15:54:53 +0100 | [diff] [blame] | 42 | 'src/test_generate_id.cpp', |
Krzysztof Grobelny | c8e3a64 | 2020-10-23 12:29:16 +0200 | [diff] [blame] | 43 | 'src/test_metric.cpp', |
Wludzik, Jozef | 1477fe6 | 2021-01-02 11:56:10 +0100 | [diff] [blame] | 44 | 'src/test_numeric_threshold.cpp', |
Szymon Dompke | f763c9e | 2021-03-12 09:19:22 +0100 | [diff] [blame] | 45 | 'src/test_on_change_threshold.cpp', |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 46 | 'src/test_persistent_json_storage.cpp', |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 47 | 'src/test_report.cpp', |
| 48 | 'src/test_report_manager.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 49 | 'src/test_sensor.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 50 | 'src/test_sensor_cache.cpp', |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 51 | 'src/test_transform.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 52 | 'src/test_trigger.cpp', |
Wludzik, Jozef | d960e1f | 2021-01-08 09:25:59 +0100 | [diff] [blame] | 53 | 'src/test_trigger_actions.cpp', |
Wludzik, Jozef | 76833cb | 2020-12-21 14:42:41 +0100 | [diff] [blame] | 54 | 'src/test_trigger_manager.cpp', |
Krzysztof Grobelny | b564594 | 2020-09-29 11:52:45 +0200 | [diff] [blame] | 55 | 'src/test_unique_call.cpp', |
Krzysztof Grobelny | 7f06f61 | 2020-09-24 13:42:10 +0200 | [diff] [blame] | 56 | 'src/utils/generate_unique_mock_id.cpp', |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 57 | ], |
| 58 | dependencies: [ |
| 59 | boost, |
| 60 | gmock_dep, |
| 61 | gtest_dep, |
| 62 | nlohmann_json, |
| 63 | phosphor_logging, |
| 64 | sdbusplus, |
| 65 | ], |
Lukasz Kazmierczak | a74e44f | 2021-07-23 15:02:20 +0200 | [diff] [blame] | 66 | include_directories: ['../src', 'src'], |
| 67 | cpp_args: '-fno-lto' |
Krzysztof Grobelny | 6ccfcbf | 2020-11-04 09:31:36 +0100 | [diff] [blame] | 68 | ), |
| 69 | timeout: 120, |
Krzysztof Grobelny | 73da690 | 2020-09-24 13:42:04 +0200 | [diff] [blame] | 70 | ) |