mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-28 00:35:21 +00:00
cert_audit: Output line/argument number for *.data files
Signed-off-by: Pengyu Lv <pengyu.lv@arm.com>
This commit is contained in:
parent
57240958ed
commit
7725c1d2a9
@ -338,7 +338,7 @@ class SuiteDataAuditor(Auditor):
|
||||
audit_data_list = []
|
||||
data_f = FileWrapper(filename)
|
||||
for _, _, _, test_args in parse_suite_data(data_f):
|
||||
for test_arg in test_args:
|
||||
for idx, test_arg in enumerate(test_args):
|
||||
match = re.match(r'"(?P<data>[0-9a-fA-F]+)"', test_arg)
|
||||
if not match:
|
||||
continue
|
||||
@ -347,7 +347,9 @@ class SuiteDataAuditor(Auditor):
|
||||
audit_data = self.parse_bytes(bytes.fromhex(match.group('data')))
|
||||
if audit_data is None:
|
||||
continue
|
||||
audit_data.filename = filename
|
||||
audit_data.filename = "{}:{}:{}".format(filename,
|
||||
data_f.line_no,
|
||||
idx + 1)
|
||||
audit_data_list.append(audit_data)
|
||||
|
||||
return audit_data_list
|
||||
|
Loading…
x
Reference in New Issue
Block a user