Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 1 | project( |
| 2 | 'phosphor-state-manager', |
| 3 | 'cpp', |
| 4 | default_options: [ |
| 5 | 'warning_level=3', |
| 6 | 'werror=true', |
Patrick Williams | 9beba5a | 2023-07-12 11:15:24 -0500 | [diff] [blame] | 7 | 'cpp_std=c++23' |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 8 | ], |
Patrick Williams | 9beba5a | 2023-07-12 11:15:24 -0500 | [diff] [blame] | 9 | meson_version: '>=1.1.1', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 10 | license: 'Apache-2.0', |
| 11 | version: '0.1', |
| 12 | ) |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 13 | cpp = meson.get_compiler('cpp') |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 14 | |
Thang Tran | ba2241c | 2021-10-26 17:47:09 +0700 | [diff] [blame] | 15 | build_host_gpios = get_option('host-gpios') |
| 16 | |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 17 | conf = configuration_data() |
| 18 | conf.set_quoted( |
Andrew Geissler | a0d7bb8 | 2023-03-01 12:50:14 -0600 | [diff] [blame] | 19 | 'HOST_SCHED_OBJPATH', get_option('host-sched-objpath')) |
| 20 | conf.set_quoted( |
Andrew Geissler | fe270d3 | 2021-01-27 14:06:46 -0600 | [diff] [blame] | 21 | 'HYPERVISOR_BUSNAME', get_option('hypervisor-busname')) |
| 22 | conf.set_quoted( |
| 23 | 'HYPERVISOR_OBJPATH', get_option('hypervisor-objpath')) |
| 24 | conf.set_quoted( |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 25 | 'HOST_STATE_PERSIST_PATH', get_option('host-state-persist-path')) |
| 26 | conf.set_quoted( |
| 27 | 'POH_COUNTER_PERSIST_PATH', get_option('poh-counter-persist-path')) |
| 28 | conf.set_quoted( |
| 29 | 'CHASSIS_STATE_CHANGE_PERSIST_PATH', get_option('chassis-state-change-persist-path')) |
Carol Wang | 71230ef | 2020-02-18 17:39:49 +0800 | [diff] [blame] | 30 | conf.set_quoted( |
Carol Wang | 1dbbef4 | 2020-03-09 11:51:23 +0800 | [diff] [blame] | 31 | 'SCHEDULED_HOST_TRANSITION_PERSIST_PATH', get_option('scheduled-host-transition-persist-path')) |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 32 | conf.set( |
| 33 | 'BOOT_COUNT_MAX_ALLOWED', get_option('boot-count-max-allowed')) |
| 34 | conf.set( |
| 35 | 'CLASS_VERSION', get_option('class-version')) |
Andrew Geissler | 8d8d731 | 2022-03-04 14:42:26 -0600 | [diff] [blame] | 36 | conf.set_quoted( |
| 37 | 'SYSFS_SECURE_BOOT_PATH', get_option('sysfs-secure-boot-path')) |
| 38 | conf.set_quoted( |
| 39 | 'SYSFS_ABR_IMAGE_PATH', get_option('sysfs-abr-image-path')) |
Patrick Williams | 5cd49f7 | 2023-11-29 06:44:17 -0600 | [diff] [blame] | 40 | if build_host_gpios.allowed() |
Thang Tran | ba2241c | 2021-10-26 17:47:09 +0700 | [diff] [blame] | 41 | conf.set_quoted( |
| 42 | 'HOST_GPIOS_BUSNAME', get_option('host-gpios-busname')) |
| 43 | conf.set_quoted( |
| 44 | 'HOST_GPIOS_OBJPATH', get_option('host-gpios-objpath')) |
| 45 | endif |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 46 | |
NodeMan97 | bcbee4a | 2022-05-27 15:28:45 -0500 | [diff] [blame] | 47 | conf.set10( |
| 48 | 'ONLY_RUN_APR_ON_POWER_LOSS', get_option('only-run-apr-on-power-loss')) |
| 49 | |
Lakshmi Yadlapati | b454d8b | 2023-03-27 16:11:41 -0500 | [diff] [blame] | 50 | conf.set_quoted( |
Lakshmi Yadlapati | 21d74d8 | 2023-07-20 17:37:22 -0500 | [diff] [blame] | 51 | 'SYSFS_TPM_DEVICE_PATH', get_option('sysfs-tpm-device-path')) |
| 52 | |
| 53 | conf.set_quoted( |
Lakshmi Yadlapati | b454d8b | 2023-03-27 16:11:41 -0500 | [diff] [blame] | 54 | 'SYSFS_TPM_MEASUREMENT_PATH', get_option('sysfs-tpm-measurement-path')) |
| 55 | |
Andrew Geissler | 629e3c4 | 2023-05-25 10:31:13 -0400 | [diff] [blame] | 56 | conf.set10( |
| 57 | 'ONLY_ALLOW_BOOT_WHEN_BMC_READY', get_option('only-allow-boot-when-bmc-ready')) |
| 58 | |
Andrew Geissler | 343dbf8 | 2021-03-16 16:56:09 -0500 | [diff] [blame] | 59 | # globals shared across applications |
| 60 | conf.set_quoted( |
NodeMan97 | bcbee4a | 2022-05-27 15:28:45 -0500 | [diff] [blame] | 61 | 'BASE_FILE_DIR', '/run/openbmc/') |
| 62 | |
| 63 | conf.set_quoted( |
Patrick Williams | 78c066f | 2024-02-13 12:25:58 -0600 | [diff] [blame] | 64 | 'CHASSIS_LOST_POWER_FILE', '/run/openbmc/chassis@{}-lost-power') |
NodeMan97 | bcbee4a | 2022-05-27 15:28:45 -0500 | [diff] [blame] | 65 | |
| 66 | conf.set_quoted( |
Patrick Williams | 78c066f | 2024-02-13 12:25:58 -0600 | [diff] [blame] | 67 | 'HOST_RUNNING_FILE', '/run/openbmc/host@{}-on') |
Andrew Geissler | 343dbf8 | 2021-03-16 16:56:09 -0500 | [diff] [blame] | 68 | |
Andrew Geissler | 5259f97 | 2021-08-30 15:46:55 -0500 | [diff] [blame] | 69 | conf.set_quoted( |
Thang Tran | 8be7ec4 | 2024-03-04 15:08:37 +0700 | [diff] [blame] | 70 | 'CHASSIS_ON_FILE', '/run/openbmc/chassis@{}-on') |
Andrew Geissler | 5259f97 | 2021-08-30 15:46:55 -0500 | [diff] [blame] | 71 | |
Thang Tran | 9f38152 | 2024-10-18 10:11:01 +0700 | [diff] [blame^] | 72 | conf.set( |
| 73 | 'CHECK_FWUPDATE_BEFORE_DO_TRANSITION', get_option('check-fwupdate-before-do-transition').enabled()) |
| 74 | |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 75 | configure_file(output: 'config.h', configuration: conf) |
| 76 | |
Patrick Williams | 5cd49f7 | 2023-11-29 06:44:17 -0600 | [diff] [blame] | 77 | if(get_option('warm-reboot').allowed()) |
Andrew Geissler | 7fdad60 | 2020-06-22 13:46:16 -0500 | [diff] [blame] | 78 | add_project_arguments('-DENABLE_WARM_REBOOT',language:'cpp') |
| 79 | endif |
| 80 | |
Andrew Geissler | 31cddb7 | 2024-02-27 14:20:26 -0600 | [diff] [blame] | 81 | if(get_option('force-warm-reboot').allowed()) |
| 82 | add_project_arguments('-DENABLE_FORCE_WARM_REBOOT',language:'cpp') |
| 83 | endif |
| 84 | |
Patrick Williams | f0865de | 2023-12-07 17:16:26 -0600 | [diff] [blame] | 85 | nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system') |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 86 | sdbusplus = dependency('sdbusplus') |
| 87 | sdeventplus = dependency('sdeventplus') |
| 88 | phosphorlogging = dependency('phosphor-logging') |
| 89 | phosphordbusinterfaces = dependency('phosphor-dbus-interfaces') |
Peter Delevoryas | 29c2a1c | 2024-11-25 14:03:03 -0800 | [diff] [blame] | 90 | libgpiod = dependency('libgpiod', version : '>=1.4.1', default_options: ['bindings=cxx']) |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 91 | |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 92 | if cpp.has_header('CLI/CLI.hpp') |
| 93 | CLI11 = declare_dependency() |
| 94 | else |
| 95 | CLI11 = dependency('CLI11') |
| 96 | endif |
| 97 | |
| 98 | # Get Cereal dependency. |
| 99 | cereal = dependency('cereal', required: false) |
| 100 | has_cereal = cpp.has_header_symbol( |
| 101 | 'cereal/cereal.hpp', |
| 102 | 'cereal::specialize', |
| 103 | dependencies: cereal, |
| 104 | required: false) |
| 105 | if not has_cereal |
| 106 | cereal_opts = import('cmake').subproject_options() |
Konstantin Aladyshev | 8a373d5 | 2024-04-02 17:38:32 +0300 | [diff] [blame] | 107 | cereal_opts.add_cmake_defines({'BUILD_TESTS': 'OFF', 'SKIP_PERFORMANCE_COMPARISON': 'ON'}) |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 108 | cereal_proj = import('cmake').subproject( |
| 109 | 'cereal', |
| 110 | options: cereal_opts, |
| 111 | required: false) |
| 112 | assert(cereal_proj.found(), 'cereal is required') |
| 113 | cereal = cereal_proj.dependency('cereal') |
| 114 | endif |
| 115 | |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 116 | executable('phosphor-host-state-manager', |
| 117 | 'host_state_manager.cpp', |
| 118 | 'host_state_manager_main.cpp', |
| 119 | 'settings.cpp', |
Andrew Geissler | 0d1c3f1 | 2021-07-27 16:21:01 -0400 | [diff] [blame] | 120 | 'host_check.cpp', |
Andrew Geissler | 1ab2b6c | 2022-03-10 16:16:15 -0600 | [diff] [blame] | 121 | 'utils.cpp', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 122 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 123 | cereal, |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 124 | libgpiod, |
| 125 | phosphordbusinterfaces, |
| 126 | phosphorlogging, |
| 127 | sdbusplus, |
| 128 | sdeventplus, |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 129 | ], |
| 130 | implicit_include_directories: true, |
| 131 | install: true |
| 132 | ) |
| 133 | |
Andrew Geissler | fe270d3 | 2021-01-27 14:06:46 -0600 | [diff] [blame] | 134 | executable('phosphor-hypervisor-state-manager', |
| 135 | 'hypervisor_state_manager.cpp', |
| 136 | 'hypervisor_state_manager_main.cpp', |
| 137 | 'settings.cpp', |
| 138 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 139 | phosphordbusinterfaces, |
| 140 | phosphorlogging, |
| 141 | sdbusplus, |
| 142 | sdeventplus, |
Andrew Geissler | fe270d3 | 2021-01-27 14:06:46 -0600 | [diff] [blame] | 143 | ], |
| 144 | implicit_include_directories: true, |
| 145 | install: true |
| 146 | ) |
| 147 | |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 148 | executable('phosphor-chassis-state-manager', |
| 149 | 'chassis_state_manager.cpp', |
| 150 | 'chassis_state_manager_main.cpp', |
Andrew Geissler | f8ae6a0 | 2022-01-21 17:00:20 -0600 | [diff] [blame] | 151 | 'utils.cpp', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 152 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 153 | cereal, |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 154 | libgpiod, |
Patrick Williams | f0865de | 2023-12-07 17:16:26 -0600 | [diff] [blame] | 155 | nlohmann_json_dep, |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 156 | phosphordbusinterfaces, |
| 157 | phosphorlogging, |
| 158 | sdbusplus, |
| 159 | sdeventplus, |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 160 | ], |
| 161 | implicit_include_directories: true, |
| 162 | install: true |
| 163 | ) |
| 164 | |
Andrew Geissler | 378fe11 | 2022-02-03 16:39:44 -0600 | [diff] [blame] | 165 | executable('phosphor-chassis-check-power-status', |
| 166 | 'chassis_check_power_status.cpp', |
| 167 | 'utils.cpp', |
| 168 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 169 | libgpiod, |
| 170 | phosphordbusinterfaces, |
| 171 | phosphorlogging, |
| 172 | sdbusplus, |
Andrew Geissler | 378fe11 | 2022-02-03 16:39:44 -0600 | [diff] [blame] | 173 | ], |
| 174 | implicit_include_directories: true, |
| 175 | install: true |
| 176 | ) |
| 177 | |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 178 | executable('phosphor-bmc-state-manager', |
| 179 | 'bmc_state_manager.cpp', |
| 180 | 'bmc_state_manager_main.cpp', |
Andrew Geissler | 98e64e6 | 2022-01-25 16:02:56 -0600 | [diff] [blame] | 181 | 'utils.cpp', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 182 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 183 | libgpiod, |
| 184 | phosphordbusinterfaces, |
| 185 | phosphorlogging, |
| 186 | sdbusplus, |
| 187 | sdeventplus, |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 188 | ], |
| 189 | implicit_include_directories: true, |
| 190 | install: true |
| 191 | ) |
| 192 | |
| 193 | executable('phosphor-discover-system-state', |
| 194 | 'discover_system_state.cpp', |
| 195 | 'settings.cpp', |
Andrew Geissler | 49e6713 | 2022-01-26 14:27:52 -0600 | [diff] [blame] | 196 | 'utils.cpp', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 197 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 198 | cereal, |
| 199 | libgpiod, |
| 200 | phosphorlogging, |
| 201 | sdbusplus, |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 202 | ], |
| 203 | implicit_include_directories: true, |
| 204 | install: true |
| 205 | ) |
| 206 | |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 207 | executable('phosphor-systemd-target-monitor', |
Andrew Geissler | 9e3afdf | 2022-02-10 15:06:16 -0600 | [diff] [blame] | 208 | 'systemd_service_parser.cpp', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 209 | 'systemd_target_monitor.cpp', |
| 210 | 'systemd_target_parser.cpp', |
| 211 | 'systemd_target_signal.cpp', |
Andrew Geissler | 55e96ac | 2022-04-19 11:44:53 -0400 | [diff] [blame] | 212 | 'utils.cpp', |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 213 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 214 | CLI11, |
Andrew Geissler | 55e96ac | 2022-04-19 11:44:53 -0400 | [diff] [blame] | 215 | libgpiod, |
Patrick Williams | f0865de | 2023-12-07 17:16:26 -0600 | [diff] [blame] | 216 | nlohmann_json_dep, |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 217 | phosphorlogging, |
| 218 | sdbusplus, |
| 219 | sdeventplus, |
Andrew Geissler | f245410 | 2019-12-06 15:14:08 -0600 | [diff] [blame] | 220 | ], |
| 221 | implicit_include_directories: true, |
| 222 | install: true |
| 223 | ) |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 224 | |
Carol Wang | 71230ef | 2020-02-18 17:39:49 +0800 | [diff] [blame] | 225 | executable('phosphor-scheduled-host-transition', |
| 226 | 'scheduled_host_transition_main.cpp', |
| 227 | 'scheduled_host_transition.cpp', |
Carol Wang | dc05939 | 2020-03-13 17:39:17 +0800 | [diff] [blame] | 228 | 'utils.cpp', |
Carol Wang | 71230ef | 2020-02-18 17:39:49 +0800 | [diff] [blame] | 229 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 230 | cereal, |
| 231 | libgpiod, |
| 232 | phosphorlogging, |
| 233 | sdbusplus, |
| 234 | sdeventplus, |
Carol Wang | 71230ef | 2020-02-18 17:39:49 +0800 | [diff] [blame] | 235 | ], |
| 236 | implicit_include_directories: true, |
| 237 | install: true |
| 238 | ) |
| 239 | |
Andrew Geissler | ba0163a | 2021-08-11 15:09:50 -0400 | [diff] [blame] | 240 | executable('phosphor-host-reset-recovery', |
| 241 | 'host_reset_recovery.cpp', |
| 242 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 243 | phosphorlogging, |
| 244 | sdbusplus, |
Andrew Geissler | ba0163a | 2021-08-11 15:09:50 -0400 | [diff] [blame] | 245 | ], |
| 246 | implicit_include_directories: true, |
| 247 | install: true |
| 248 | ) |
| 249 | |
Andrew Geissler | 6b9421b | 2022-02-24 17:01:55 -0600 | [diff] [blame] | 250 | executable('phosphor-secure-boot-check', |
| 251 | 'secure_boot_check.cpp', |
| 252 | 'utils.cpp', |
| 253 | dependencies: [ |
Patrick Williams | 78c066f | 2024-02-13 12:25:58 -0600 | [diff] [blame] | 254 | sdbusplus, |
NodeMan97 | 27d1e14 | 2022-07-27 15:10:07 -0500 | [diff] [blame] | 255 | phosphorlogging, libgpiod |
Andrew Geissler | 6b9421b | 2022-02-24 17:01:55 -0600 | [diff] [blame] | 256 | ], |
| 257 | implicit_include_directories: true, |
| 258 | install: true |
| 259 | ) |
| 260 | |
Andrew Geissler | dfa75fc | 2019-12-11 17:26:42 -0600 | [diff] [blame] | 261 | install_data('obmcutil', |
| 262 | install_mode: 'rwxr-xr-x', |
| 263 | install_dir: get_option('bindir') |
| 264 | ) |
| 265 | |
Andrew Geissler | 128ea8e | 2022-06-22 12:28:15 -0400 | [diff] [blame] | 266 | install_data('scripts/host-reboot', |
| 267 | install_mode: 'rwxr-xr-x', |
Patrick Williams | 306c5ff | 2024-04-04 14:04:07 -0500 | [diff] [blame] | 268 | install_dir: get_option('libexecdir')/'phosphor-state-manager' |
Andrew Geissler | 128ea8e | 2022-06-22 12:28:15 -0400 | [diff] [blame] | 269 | ) |
| 270 | |
Andrew Geissler | 179d38c | 2019-12-10 15:05:23 -0600 | [diff] [blame] | 271 | systemd = dependency('systemd') |
Andrew Geissler | 429100a | 2021-09-09 12:50:24 -0500 | [diff] [blame] | 272 | systemd_system_unit_dir = systemd.get_variable( |
Patrick Williams | c079c3f | 2023-04-12 08:01:05 -0500 | [diff] [blame] | 273 | 'systemdsystemunitdir') |
Andrew Geissler | 179d38c | 2019-12-10 15:05:23 -0600 | [diff] [blame] | 274 | subdir('service_files') |
Andrew Geissler | c101157 | 2020-01-27 15:09:50 -0600 | [diff] [blame] | 275 | subdir('target_files') |
Andrew Geissler | 179d38c | 2019-12-10 15:05:23 -0600 | [diff] [blame] | 276 | |
Patrick Williams | 5cd49f7 | 2023-11-29 06:44:17 -0600 | [diff] [blame] | 277 | if build_host_gpios.allowed() |
Thang Tran | ba2241c | 2021-10-26 17:47:09 +0700 | [diff] [blame] | 278 | subdir('host_condition_gpio') |
| 279 | endif |
| 280 | |
Andrew Geissler | efef970 | 2019-12-10 16:56:57 -0600 | [diff] [blame] | 281 | datadir = join_paths( |
| 282 | get_option('sysconfdir'), |
| 283 | 'phosphor-systemd-target-monitor' |
| 284 | ) |
| 285 | subdir('data') |
| 286 | |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 287 | build_tests = get_option('tests') |
| 288 | |
| 289 | # If test coverage of source files within the root directory are wanted, |
| 290 | # need to define and build the tests from here |
| 291 | if not build_tests.disabled() |
| 292 | gtest = dependency('gtest', main: true, disabler: true, required: build_tests) |
Carol Wang | 4ca6f3f | 2020-02-19 16:28:59 +0800 | [diff] [blame] | 293 | gmock = dependency('gmock', disabler: true, required: build_tests) |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 294 | test( |
| 295 | 'test_systemd_parser', |
| 296 | executable('test_systemd_parser', |
| 297 | './test/systemd_parser.cpp', |
| 298 | 'systemd_target_parser.cpp', |
| 299 | dependencies: [ |
| 300 | gtest, |
Patrick Williams | f0865de | 2023-12-07 17:16:26 -0600 | [diff] [blame] | 301 | nlohmann_json_dep, |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 302 | ], |
| 303 | implicit_include_directories: true, |
| 304 | include_directories: '../' |
| 305 | ) |
| 306 | ) |
| 307 | |
| 308 | test( |
| 309 | 'test_systemd_signal', |
| 310 | executable('test_systemd_signal', |
| 311 | './test/systemd_signal.cpp', |
| 312 | 'systemd_target_signal.cpp', |
Andrew Geissler | 55e96ac | 2022-04-19 11:44:53 -0400 | [diff] [blame] | 313 | 'utils.cpp', |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 314 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 315 | gtest, |
Andrew Geissler | 55e96ac | 2022-04-19 11:44:53 -0400 | [diff] [blame] | 316 | libgpiod, |
Patrick Williams | f0865de | 2023-12-07 17:16:26 -0600 | [diff] [blame] | 317 | nlohmann_json_dep, |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 318 | phosphorlogging, |
| 319 | sdbusplus, |
| 320 | sdeventplus, |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 321 | ], |
| 322 | implicit_include_directories: true, |
| 323 | include_directories: '../' |
| 324 | ) |
| 325 | ) |
Carol Wang | 4ca6f3f | 2020-02-19 16:28:59 +0800 | [diff] [blame] | 326 | |
| 327 | test( |
| 328 | 'test_scheduled_host_transition', |
| 329 | executable('test_scheduled_host_transition', |
| 330 | './test/test_scheduled_host_transition.cpp', |
| 331 | 'scheduled_host_transition.cpp', |
Carol Wang | dc05939 | 2020-03-13 17:39:17 +0800 | [diff] [blame] | 332 | 'utils.cpp', |
Carol Wang | 4ca6f3f | 2020-02-19 16:28:59 +0800 | [diff] [blame] | 333 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 334 | cereal, |
| 335 | gmock, |
| 336 | gtest, |
| 337 | libgpiod, |
| 338 | phosphorlogging, |
| 339 | sdbusplus, |
| 340 | sdeventplus, |
Carol Wang | 4ca6f3f | 2020-02-19 16:28:59 +0800 | [diff] [blame] | 341 | ], |
| 342 | implicit_include_directories: true, |
| 343 | include_directories: '../' |
| 344 | ) |
| 345 | ) |
Andrew Geissler | c74716e | 2021-02-09 15:11:10 -0600 | [diff] [blame] | 346 | |
| 347 | test( |
| 348 | 'test_hypervisor_state', |
| 349 | executable('test_hypervisor_state', |
| 350 | './test/hypervisor_state.cpp', |
| 351 | 'hypervisor_state_manager.cpp', |
| 352 | dependencies: [ |
Patrick Williams | f8d5f3e | 2022-04-05 15:51:15 -0500 | [diff] [blame] | 353 | gtest, |
| 354 | phosphorlogging, |
| 355 | sdbusplus, |
| 356 | sdeventplus, |
Andrew Geissler | c74716e | 2021-02-09 15:11:10 -0600 | [diff] [blame] | 357 | ], |
| 358 | implicit_include_directories: true, |
| 359 | include_directories: '../' |
| 360 | ) |
| 361 | ) |
Andrew Geissler | 3f12563 | 2019-12-11 17:08:19 -0600 | [diff] [blame] | 362 | endif |