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