]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests: Cleanup printing of test timing
authorTom Hromatka <tom.hromatka@oracle.com>
Mon, 26 Oct 2020 22:06:14 +0000 (16:06 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 28 Oct 2020 18:40:47 +0000 (12:40 -0600)
Combine the passed, skipped, and failed tests into a
single list when displaying the timing results of
each test.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
ftests/ftests.py

index 0a9c35064d7d87229131247c689c284b858c88ea..7b39d6c9ec373af3204f57dc6d71ea9998cf92e7 100755 (executable)
@@ -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)