blob: 242c02aa3be5012c4b4ac59d0e5a7db448f79eb1 [file] [log] [blame]
phosphor_regulators_tests_include_directories = include_directories(
'.',
'actions'
)
phosphor_regulators_tests_source_files = [
'chassis_tests.cpp',
'config_file_parser_error_tests.cpp',
'config_file_parser_tests.cpp',
'configuration_tests.cpp',
'device_tests.cpp',
'exception_utils_tests.cpp',
'id_map_tests.cpp',
'mock_journal.cpp',
'pmbus_error_tests.cpp',
'pmbus_utils_tests.cpp',
'presence_detection_tests.cpp',
'rail_tests.cpp',
'rule_tests.cpp',
'sensor_monitoring_tests.cpp',
'system_tests.cpp',
'write_verification_error_tests.cpp',
'actions/action_environment_tests.cpp',
'actions/action_error_tests.cpp',
'actions/action_utils_tests.cpp',
'actions/and_action_tests.cpp',
'actions/i2c_action_tests.cpp',
'actions/i2c_compare_bit_action_tests.cpp',
'actions/i2c_compare_byte_action_tests.cpp',
'actions/i2c_compare_bytes_action_tests.cpp',
'actions/i2c_write_bit_action_tests.cpp',
'actions/i2c_write_byte_action_tests.cpp',
'actions/i2c_write_bytes_action_tests.cpp',
'actions/if_action_tests.cpp',
'actions/not_action_tests.cpp',
'actions/or_action_tests.cpp',
'actions/pmbus_write_vout_command_action_tests.cpp',
'actions/run_rule_action_tests.cpp',
'actions/set_device_action_tests.cpp'
]
# Add validation tool tests if we are not in an SDK. The SDK does not currently
# include the jsonschema Python module required by the validation tool.
if not get_option('oe-sdk').enabled()
phosphor_regulators_tests_source_files += 'validate-regulators-config_tests.cpp'
endif
test('phosphor-regulators-tests',
executable('phosphor-regulators-tests',
phosphor_regulators_tests_source_files,
dependencies: [
gmock,
gtest,
],
link_args: dynamic_linker,
build_rpath: get_option('oe-sdk').enabled() ? rpath : '',
link_with: [
phosphor_regulators_library,
libi2c_dev_mock
],
implicit_include_directories: false,
include_directories: [
phosphor_regulators_include_directories,
phosphor_regulators_tests_include_directories,
libi2c_inc,
libi2c_dev_mock_inc
]
),
timeout : 180
)