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