From: Tom Hromatka Date: Mon, 26 Oct 2020 22:06:14 +0000 (-0600) Subject: ftests: Cleanup printing of test timing X-Git-Tag: v2.0.3~11^2^2~31^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99927ec23b51c5e51a84742de7b14be49b0d5a1c;p=thirdparty%2Flibcgroup.git ftests: Cleanup printing of test timing Combine the passed, skipped, and failed tests into a single list when displaying the timing results of each test. Signed-off-by: Tom Hromatka --- diff --git a/ftests/ftests.py b/ftests/ftests.py index 0a9c3506..7b39d6c9 100755 --- a/ftests/ftests.py +++ b/ftests/ftests.py @@ -250,10 +250,10 @@ def run_tests(config): print("\t---------------------------------------------------------") time_str = "{0: 2.2f}".format(setup_time) print('\t{}{}'.format('{0: <35}'.format('setup'), '{0: >15}'.format(time_str))) - for test in passed_tests: - time_str = "{0: 2.2f}".format(test[1]) - print('\t{}{}'.format('{0: <35}'.format(test[0]), '{0: >15}'.format(time_str))) - for test in failed_tests: + + all_tests = passed_tests + skipped_tests + failed_tests + all_tests.sort() + for test in all_tests: time_str = "{0: 2.2f}".format(test[1]) print('\t{}{}'.format('{0: <35}'.format(test[0]), '{0: >15}'.format(time_str))) time_str = "{0: 2.2f}".format(teardown_time)