blob: 9102622427393a2b14a0e86041e0cd635c9ce915 [file] [log] [blame]
Shawn McCarney623f5a82019-11-03 08:55:40 -06001phosphor_regulators_tests_include_directories = include_directories(
2 '.',
3 'actions'
4)
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 McCarney55f496c2020-04-09 16:19:14 -050012 'exception_utils_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060013 'id_map_tests.cpp',
Shawn McCarney7c5d7b22020-04-03 18:50:13 -050014 'mock_journal.cpp',
Shawn McCarneya5ef5402020-03-01 16:29:44 -060015 'pmbus_error_tests.cpp',
Shawn McCarney6663abf2020-02-29 17:25:48 -060016 'pmbus_utils_tests.cpp',
Shawn McCarneybfe2c252020-03-10 14:05:19 -050017 'presence_detection_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060018 'rail_tests.cpp',
19 'rule_tests.cpp',
Shawn McCarneybc47c1b2020-03-10 15:38:07 -050020 'sensor_monitoring_tests.cpp',
Shawn McCarneyc3991f12020-04-05 13:16:06 -050021 'system_tests.cpp',
Shawn McCarneya5ef5402020-03-01 16:29:44 -060022 'write_verification_error_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060023
24 'actions/action_environment_tests.cpp',
Shawn McCarney8f0d1422020-02-02 15:54:47 -060025 'actions/action_error_tests.cpp',
Shawn McCarney78488f62019-11-05 15:29:54 -060026 'actions/action_utils_tests.cpp',
Shawn McCarney74538a62019-11-13 11:24:17 -060027 'actions/and_action_tests.cpp',
Bob King07301ea2020-04-21 17:22:23 +080028 'actions/compare_presence_action_tests.cpp',
Shawn McCarneyb38da992020-02-13 08:55:46 -060029 'actions/i2c_action_tests.cpp',
Shawn McCarney8215be32020-02-19 10:00:57 -060030 'actions/i2c_compare_bit_action_tests.cpp',
Shawn McCarneyb38da992020-02-13 08:55:46 -060031 'actions/i2c_compare_byte_action_tests.cpp',
Shawn McCarney5ad53942020-02-20 09:33:55 -060032 'actions/i2c_compare_bytes_action_tests.cpp',
Shawn McCarney88d5b692020-02-25 10:39:02 -060033 'actions/i2c_write_bit_action_tests.cpp',
Shawn McCarneyf1c90612020-02-24 09:56:53 -060034 'actions/i2c_write_byte_action_tests.cpp',
Shawn McCarney83169bf2020-02-24 15:59:34 -060035 'actions/i2c_write_bytes_action_tests.cpp',
Shawn McCarney6d597732019-11-13 17:40:07 -060036 'actions/if_action_tests.cpp',
Shawn McCarney6aac4142019-11-12 19:47:13 -060037 'actions/not_action_tests.cpp',
Shawn McCarneyd3bbfe22019-11-13 13:53:20 -060038 'actions/or_action_tests.cpp',
Shawn McCarneya8119f22020-03-02 16:20:18 -060039 'actions/pmbus_write_vout_command_action_tests.cpp',
Shawn McCarney2134ca62019-11-11 13:06:18 -060040 'actions/run_rule_action_tests.cpp',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060041 'actions/set_device_action_tests.cpp'
42]
43
Shawn McCarneye85499b2020-03-27 15:15:24 -050044# Add validation tool tests if we are not in an SDK. The SDK does not currently
45# include the jsonschema Python module required by the validation tool.
46if not get_option('oe-sdk').enabled()
47 phosphor_regulators_tests_source_files += 'validate-regulators-config_tests.cpp'
48endif
49
Shawn McCarneya2461b32019-10-24 18:53:01 -050050test('phosphor-regulators-tests',
51 executable('phosphor-regulators-tests',
Shawn McCarney6b2ebaf2019-11-04 12:12:19 -060052 phosphor_regulators_tests_source_files,
Shawn McCarneya2461b32019-10-24 18:53:01 -050053 dependencies: [
54 gmock,
55 gtest,
56 ],
Brandon Wymandc8e9312020-02-14 17:04:18 -060057 link_args: dynamic_linker,
58 build_rpath: get_option('oe-sdk').enabled() ? rpath : '',
Shawn McCarneyafb7fc32019-12-11 19:42:03 -060059 link_with: [
60 phosphor_regulators_library,
61 libi2c_dev_mock
62 ],
Shawn McCarneya2461b32019-10-24 18:53:01 -050063 implicit_include_directories: false,
Shawn McCarney623f5a82019-11-03 08:55:40 -060064 include_directories: [
65 phosphor_regulators_include_directories,
Shawn McCarneyafb7fc32019-12-11 19:42:03 -060066 phosphor_regulators_tests_include_directories,
67 libi2c_inc,
68 libi2c_dev_mock_inc
Shawn McCarney623f5a82019-11-03 08:55:40 -060069 ]
Bob Kinga57e0812020-03-12 10:47:42 +080070 ),
Bob Kingbafcb862020-03-31 16:39:00 +080071 timeout : 180
Shawn McCarneya2461b32019-10-24 18:53:01 -050072)