Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/scripts/check-test-cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import sys

class Results:
"""Store file and line information about errors or warnings in test suites."""
def __init__(self):
self.errors = 0
self.warnings = 0
Expand All @@ -41,6 +42,7 @@ def warning(self, file_name, line_number, fmt, *args):
self.warnings += 1

def collect_test_directories():
"""Get the relative path for the TLS and Crypto test directories."""
if os.path.isdir('tests'):
tests_dir = 'tests'
elif os.path.isdir('suites'):
Expand All @@ -55,6 +57,7 @@ def collect_test_directories():
return directories

def check_description(results, seen, file_name, line_number, description):
"""Check test case descriptions for errors."""
if description in seen:
results.error(file_name, line_number,
'Duplicate description (also line {})',
Expand Down
5 changes: 4 additions & 1 deletion tests/scripts/mbedtls_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ def run_test(self, name, function_id, dependencies, args):

param_bytes, length = self.test_vector_to_bytes(function_id,
dependencies, args)
self.send_kv(''.join('{:02x}'.format(x) for x in length), ''.join('{:02x}'.format(x) for x in param_bytes))
self.send_kv(
''.join('{:02x}'.format(x) for x in length),
''.join('{:02x}'.format(x) for x in param_bytes)
)

@staticmethod
def get_result(value):
Expand Down