Merge pull request #37704 from vdimir/failed_test_default_sort

Display entires for failed tests at the top of report by default
This commit is contained in:
Alexey Milovidov 2022-06-01 12:00:55 +03:00 committed by GitHub
commit 154cae4356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,11 @@ def create_test_html_report(
num_fails = 0
has_test_time = False
has_test_logs = False
if with_raw_logs:
# Display entires with logs at the top (they correspond to failed tests)
test_result.sort(key=lambda result: len(result) <= 3)
for result in test_result:
test_name = result[0]
test_status = result[1]