1phosphor_regulators_tests_include_directories = include_directories( 2 '.', 3 'actions' 4) 5 6phosphor_regulators_tests_source_files = [ 7 'chassis_tests.cpp', 8 'config_file_parser_error_tests.cpp', 9 'config_file_parser_tests.cpp', 10 'configuration_tests.cpp', 11 'device_tests.cpp', 12 'exception_utils_tests.cpp', 13 'id_map_tests.cpp', 14 'mock_journal.cpp', 15 'pmbus_error_tests.cpp', 16 'pmbus_utils_tests.cpp', 17 'presence_detection_tests.cpp', 18 'rail_tests.cpp', 19 'rule_tests.cpp', 20 'sensor_monitoring_tests.cpp', 21 'system_tests.cpp', 22 'write_verification_error_tests.cpp', 23 24 'actions/action_environment_tests.cpp', 25 'actions/action_error_tests.cpp', 26 'actions/action_utils_tests.cpp', 27 'actions/and_action_tests.cpp', 28 'actions/compare_presence_action_tests.cpp', 29 'actions/compare_vpd_action_tests.cpp', 30 'actions/i2c_action_tests.cpp', 31 'actions/i2c_compare_bit_action_tests.cpp', 32 'actions/i2c_compare_byte_action_tests.cpp', 33 'actions/i2c_compare_bytes_action_tests.cpp', 34 'actions/i2c_write_bit_action_tests.cpp', 35 'actions/i2c_write_byte_action_tests.cpp', 36 'actions/i2c_write_bytes_action_tests.cpp', 37 'actions/if_action_tests.cpp', 38 'actions/not_action_tests.cpp', 39 'actions/or_action_tests.cpp', 40 'actions/pmbus_read_sensor_action_tests.cpp', 41 'actions/pmbus_write_vout_command_action_tests.cpp', 42 'actions/run_rule_action_tests.cpp', 43 'actions/set_device_action_tests.cpp' 44] 45 46# Long-running tests that are excluded from CI 47if get_option('long-tests').enabled() 48 # This test requires the Python module 'jsonschema' 49 phosphor_regulators_tests_source_files += 'validate-regulators-config_tests.cpp' 50endif 51 52test('phosphor-regulators-tests', 53 executable('phosphor-regulators-tests', 54 phosphor_regulators_tests_source_files, 55 dependencies: [ 56 gmock, 57 gtest, 58 ], 59 link_args: dynamic_linker, 60 build_rpath: get_option('oe-sdk').enabled() ? rpath : '', 61 link_with: [ 62 phosphor_regulators_library, 63 libi2c_dev_mock 64 ], 65 implicit_include_directories: false, 66 include_directories: [ 67 phosphor_regulators_include_directories, 68 phosphor_regulators_tests_include_directories, 69 libi2c_inc, 70 libi2c_dev_mock_inc 71 ] 72 ), 73 timeout : 180 74) 75