Add .flash extn to supported raw firmware files
Some compact firmware files when extracted produce raw firmware files with .flash extension. This adds support for those firmware file types. Modified a test case to include the supported raw firmware file types. Closes-Bug: #1568792 Change-Id: I911ad3dc26d43547546b10500ed640602a338a7c
This commit is contained in:
@@ -50,7 +50,7 @@ LOG = log.get_logger(__name__)
|
||||
SUPPORTED_FIRMWARE_UPDATE_COMPONENTS = ['ilo', 'cpld', 'power_pic', 'bios',
|
||||
'chassis']
|
||||
# Supported raw firmware file extensions
|
||||
RAW_FIRMWARE_EXTNS = ['.hex', '.bin', '.vme']
|
||||
RAW_FIRMWARE_EXTNS = ['.hex', '.bin', '.vme', '.flash']
|
||||
|
||||
|
||||
def check_firmware_update_component(func):
|
||||
|
||||
@@ -106,11 +106,11 @@ class FirmwareControllerModuleTestCase(unittest.TestCase):
|
||||
_extract_rpm_file_mock.assert_called_once_with(
|
||||
fw_img_extractor, 'some_target_file', 'some_extract_path')
|
||||
|
||||
def test_no_op_extract_gets_invoked_for_raw_firmware_file(self):
|
||||
@ddt.data('any_file.hex', 'any_file.bin', 'any_file.vme', 'any_file.flash')
|
||||
def test_no_op_extract_gets_invoked_for_raw_firmware_file(self,
|
||||
any_raw_file):
|
||||
# no_op extract when fw_img_extractor is initialized
|
||||
# with raw firmware file
|
||||
# | GIVEN |
|
||||
any_raw_file = 'any_file.bin'
|
||||
# | WHEN |
|
||||
fw_img_extractor = firmware_controller.get_fw_extractor(any_raw_file)
|
||||
return_result, is_extracted = fw_img_extractor.extract()
|
||||
|
||||
Reference in New Issue
Block a user