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