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