blob: 20fa19d4319cb5d86588c19eb22c20417c7650bf [file] [log] [blame]
Shawn McCarney623f5a82019-11-03 08:55:40 -06001phosphor_regulators_tests_include_directories = include_directories(
2 '.',
Patrick Williams516e22f2025-02-01 08:37:12 -05003 'actions',
Shawn McCarney623f5a82019-11-03 08:55:40 -06004)
5
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -06006phosphor_regulators_tests_source_files = [
Shawn McCarney8a3afd72020-03-12 14:28:44 -05007 'chassis_tests.cpp',
Shawn McCarney79a0b102020-03-26 23:49:02 -05008 'config_file_parser_error_tests.cpp',
Shawn McCarney0e8c68a2020-03-27 01:44:48 -05009 'config_file_parser_tests.cpp',
Shawn McCarneyd3a8aab2020-03-10 10:30:02 -050010 'configuration_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060011 'device_tests.cpp',
Shawn McCarney66332cd2020-07-13 19:14:18 -050012 'error_history_tests.cpp',
Shawn McCarneyaaa4fdd2021-03-18 19:32:37 -050013 'error_logging_utils_tests.cpp',
Shawn McCarney55f496c2020-04-09 16:19:14 -050014 'exception_utils_tests.cpp',
Shawn McCarneyf3633f62020-09-02 10:34:52 -050015 'ffdc_file_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060016 'id_map_tests.cpp',
Shawn McCarney9284c302021-09-02 11:23:04 -050017 'phase_fault_detection_tests.cpp',
Shawn McCarney421128e2021-08-25 10:00:59 -050018 'phase_fault_tests.cpp',
Shawn McCarneya5ef5402020-03-01 16:29:44 -060019 'pmbus_error_tests.cpp',
Shawn McCarney6663abf2020-02-29 17:25:48 -060020 'pmbus_utils_tests.cpp',
Shawn McCarneybfe2c252020-03-10 14:05:19 -050021 'presence_detection_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060022 'rail_tests.cpp',
23 'rule_tests.cpp',
Shawn McCarneybc47c1b2020-03-10 15:38:07 -050024 'sensor_monitoring_tests.cpp',
Shawn McCarney0a450192021-04-12 16:13:24 -050025 'sensors_tests.cpp',
Shawn McCarneyc3991f12020-04-05 13:16:06 -050026 'system_tests.cpp',
Jayanth Othayoth891112d2025-06-08 10:09:47 -050027 'test_utils.cpp',
Shawn McCarneya5ef5402020-03-01 16:29:44 -060028 'write_verification_error_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060029 'actions/action_environment_tests.cpp',
Shawn McCarney8f0d1422020-02-02 15:54:47 -060030 'actions/action_error_tests.cpp',
Shawn McCarney78488f62019-11-05 15:29:54 -060031 'actions/action_utils_tests.cpp',
Shawn McCarney74538a62019-11-13 11:24:17 -060032 'actions/and_action_tests.cpp',
Bob King07301ea2020-04-21 17:22:23 +080033 'actions/compare_presence_action_tests.cpp',
Bob King8e4cb642020-04-24 13:18:53 +080034 'actions/compare_vpd_action_tests.cpp',
Shawn McCarneyb38da992020-02-13 08:55:46 -060035 'actions/i2c_action_tests.cpp',
Shawn McCarney3b242b72021-08-27 09:55:22 -050036 'actions/i2c_capture_bytes_action_tests.cpp',
Shawn McCarney8215be32020-02-19 10:00:57 -060037 'actions/i2c_compare_bit_action_tests.cpp',
Shawn McCarneyb38da992020-02-13 08:55:46 -060038 'actions/i2c_compare_byte_action_tests.cpp',
Shawn McCarney5ad53942020-02-20 09:33:55 -060039 'actions/i2c_compare_bytes_action_tests.cpp',
Shawn McCarney88d5b692020-02-25 10:39:02 -060040 'actions/i2c_write_bit_action_tests.cpp',
Shawn McCarneyf1c90612020-02-24 09:56:53 -060041 'actions/i2c_write_byte_action_tests.cpp',
Shawn McCarney83169bf2020-02-24 15:59:34 -060042 'actions/i2c_write_bytes_action_tests.cpp',
Shawn McCarney6d597732019-11-13 17:40:07 -060043 'actions/if_action_tests.cpp',
Shawn McCarneyfa23f7d2021-08-26 15:31:47 -050044 'actions/log_phase_fault_action_tests.cpp',
Shawn McCarney6aac4142019-11-12 19:47:13 -060045 'actions/not_action_tests.cpp',
Shawn McCarneyd3bbfe22019-11-13 13:53:20 -060046 'actions/or_action_tests.cpp',
Bob Kingd6820bb2020-04-28 15:37:02 +080047 'actions/pmbus_read_sensor_action_tests.cpp',
Shawn McCarneya8119f22020-03-02 16:20:18 -060048 'actions/pmbus_write_vout_command_action_tests.cpp',
Shawn McCarney2134ca62019-11-11 13:06:18 -060049 'actions/run_rule_action_tests.cpp',
Patrick Williams516e22f2025-02-01 08:37:12 -050050 'actions/set_device_action_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060051]
52
Shawn McCarneydf42c0d2020-04-29 14:36:36 -050053# Long-running tests that are excluded from CI
Patrick Williams5c6a6932023-11-29 06:44:29 -060054if get_option('long-tests').allowed()
Shawn McCarneydf42c0d2020-04-29 14:36:36 -050055 # This test requires the Python module 'jsonschema'
Shawn McCarneye85499b2020-03-27 15:15:24 -050056 phosphor_regulators_tests_source_files += 'validate-regulators-config_tests.cpp'
57endif
58
Patrick Williams516e22f2025-02-01 08:37:12 -050059test(
60 'phosphor-regulators-tests',
61 executable(
62 'phosphor-regulators-tests',
63 phosphor_regulators_tests_source_files,
64 dependencies: [
65 gmock,
66 gtest,
67 nlohmann_json_dep,
68 phosphor_dbus_interfaces,
69 phosphor_logging,
70 sdbusplus,
71 ],
72 link_args: dynamic_linker,
73 build_rpath: get_option('oe-sdk').allowed() ? rpath : '',
74 link_with: [phosphor_regulators_library, libi2c_dev_mock, libpower],
75 implicit_include_directories: false,
76 include_directories: [
77 phosphor_regulators_include_directories,
78 phosphor_regulators_tests_include_directories,
79 libi2c_inc,
80 libi2c_dev_mock_inc,
81 ],
82 ),
83 timeout: 180,
Shawn McCarneya2461b32019-10-24 18:53:01 -050084)