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