tests: make summary section for project tests more like pytest

Logs for failing tests come first, then the list of pass/fail.
pull/12188/head
Eli Schwartz 2 years ago
parent 12e23f55d4
commit 0ecc8d5c8d
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 11
      run_project_tests.py

@ -1624,10 +1624,6 @@ if __name__ == '__main__':
(passing_tests, failing_tests, skipped_tests) = res
except StopException:
pass
print()
print('Total passed tests: ', green(str(passing_tests)))
print('Total failed tests: ', red(str(failing_tests)))
print('Total skipped tests:', yellow(str(skipped_tests)))
if failing_tests > 0:
print('\nMesonlogs of failing tests\n')
for l in failing_logs:
@ -1635,7 +1631,12 @@ if __name__ == '__main__':
print(l, '\n')
except UnicodeError:
print(l.encode('ascii', errors='replace').decode(), '\n')
print('All failures:')
print()
print('Total passed tests: ', green(str(passing_tests)))
print('Total failed tests: ', red(str(failing_tests)))
print('Total skipped tests:', yellow(str(skipped_tests)))
if failing_tests > 0:
print('\nAll failures:')
for c in failing_testcases:
print(f' -> {c}')
for name, dirs, _ in all_tests:

Loading…
Cancel
Save