You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"Unable to find certified model entry for {self.vid:04x}{self.pid:04x}{self.software_version}")
189
+
f"Unable to find certified model entry for {self.vid_pid_sv_str}")
185
190
logging.info(
186
-
f'Found certified model for vid=0x{self.vid:04X} pid=0x{self.pid:04X} software version={self.software_version} in the DCL:')
191
+
f'Found certified model for {self.vid_pid_sv_str} in the DCL:')
187
192
logging.info(f'{entry[key]}')
188
193
189
194
defsteps_AllSoftwareVersions(self):
190
195
return [TestStep(1, "Query the version information for this software version", "DCL entry exists"),
191
196
TestStep(2, "For each valid software version with an OtaUrl, verify the OtaChecksumType is in the valid range and the OtaChecksum is a base64. If the softwareVersion matches the current softwareVersion on the device, ensure the entry is valid.", "OtaChecksum is base64 and OtaChecksumType is in the valid set")]
asserts.assert_true(key_model_versionsinversions_entry.keys(), f"Unable to find {key_model_versions} in software versions schema for vid=0x{self.vid:04X} pid=0x{self.pid:04X}")
197
-
logging.info(
198
-
f'Found version info for vid=0x{self.vid:04X} pid=0x{self.pid:04X} in the DCL:')
202
+
asserts.assert_true(key_model_versionsinversions_entry.keys(), f"Unable to find {key_model_versions} in software versions schema for {self.vid_pid_str}")
203
+
logging.info(f'Found version info for vid=0x{self.vid_pid_str} in the DCL:')
asserts.assert_true(key_software_versionsinversions_entry[key_model_versions].keys(), f"Unable to find {key_software_versions} in software versions schema for vid=0x{self.vid:04X} pid=0x{self.pid:04X}")
206
+
asserts.assert_true(key_software_versionsinversions_entry[key_model_versions].keys(), f"Unable to find {key_software_versions} in software versions schema for {self.vid_pid_str}")
problems.append(f'OtaChecksumType for entry vid=0x{self.vid:04X} pid=0x{self.pid:04X} software version={software_version} is invalid. Found {entry[key_ota_checksum_type]} valid values: {valid_checksum_types}')
problems.append(f'OtaChecksumType for entry {self.vid_pid_str} software version={software_version} is invalid. Found {entry[key_ota_checksum_type]} valid values: {checksum_types.keys()}')
problems.append(f"Checksum {checksum} is not base64 encoded for for entry vid=0x{self.vid:04X} pid=0x{self.pid:04X} software version={software_version}")
236
-
#TODO: download and actually checksum it? Maybe just for the current version? And size check?
243
+
problems.append(f"Checksum {checksum} is not base64 encoded for for entry {self.vid_pid_str} software version={software_version}")
244
+
continue
245
+
246
+
response=requests.get(entry[key_ota_url])
247
+
ifnotresponse.ok:
248
+
problems.append(f"Unable to get OTA object from {entry[key_ota_url]} for {self.vid_pid_str} software version = {software_version}")
249
+
continue
250
+
251
+
ota_len=str(len(response.content))
252
+
dcl_len=entry[key_ota_file_size]
253
+
ifota_len!=dcl_len:
254
+
problems.append(f'Incorrect OTA size for {self.vid_pid_str} software_version = {software_version}, received size: {len(response.content)} DCL states {entry[key_ota_file_size]}')
0 commit comments