feat(tiny_test_fw): unify all junit report test case name

new format: <target>.<config>.<case_name>, the default value of
"config" is "default"
This commit is contained in:
Fu Hanxi
2021-01-25 18:10:21 +08:00
parent 7518393ee8
commit 85d4bca81a
4 changed files with 31 additions and 48 deletions

View File

@@ -110,3 +110,7 @@ def handle_unexpected_exception(junit_test_case, exception):
# AssertionError caused by an 'assert' statement has an empty string as its 'str' form
e_str = str(exception) if str(exception) else repr(exception)
junit_test_case.add_failure_info('Unexpected exception: {}\n{}'.format(e_str, traceback.format_exc()))
def format_case_id(case_name, target='esp32', config='default'):
return '{}.{}.{}'.format(target, config, case_name)