Skip to content

Commit ea13d76

Browse files
committed
tests: Use proper keys for modem_firmware in wm231
1 parent b9f4a45 commit ea13d76

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_dji_imah_fwsig_rebin1.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,13 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
343343
module_changes_limit = 2 + 4 + 256
344344
elif (m := re.match(r'^.*/(wm170|wm231|wm232|gl170|pm430|ag500)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$', modl_inp_fn, re.IGNORECASE)):
345345
platform = m.group(1)
346-
if (re.match(r'^.*{:s}_0701_[^/]*[.]fw_0701.*$'.format(platform), modl_inp_fn, re.IGNORECASE) or
346+
# specific nested modules
347+
if (re.match(r'^.*{:s}_0801_[^/]*[.]fw_0801.*\/modem_firmware.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
348+
module_cmdopts = "-k PRAK-2018-01 -k TBIE-2020-04"
349+
# allow change of 2 bytes from auth key name, 4+4 from enc+dec checksum, 256 from signature, up to 11x16 chunk padding, 32 payload digest
350+
module_changes_limit = 2 + 4 + 4 + 256 + 11*16 + 32
351+
# remaining nested modules
352+
elif (re.match(r'^.*{:s}_0701_[^/]*[.]fw_0701.*$'.format(platform), modl_inp_fn, re.IGNORECASE) or
347353
re.match(r'^.*{:s}_0801_[^/]*[.]fw_0801.*$'.format(platform), modl_inp_fn, re.IGNORECASE) or
348354
re.match(r'^.*{:s}_0802_[^/]*[.]fw_0802.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
349355
module_cmdopts = "-k PRAK-2020-01 -k TBIE-2020-02"

0 commit comments

Comments
 (0)