浏览代码

ktest: Print build,install,boot,test times at success and failure

Since both success and failure may shortcut and exit ktest, it is better
to print the status times there too. Once times are printed, the values
for the times are reset, so they will not print more than once.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Steven Rostedt (Red Hat) 10 年之前
父节点
当前提交
4bf6e1fc99
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tools/testing/ktest/ktest.pl

+ 4 - 0
tools/testing/ktest/ktest.pl

@@ -1643,6 +1643,8 @@ sub fail {
 	    $name = " ($test_name)";
 	}
 
+	print_times;
+
 	doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
 	doprint "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
 	doprint "KTEST RESULT: TEST $i$name Failed: ", @_, "\n";
@@ -2494,6 +2496,8 @@ sub success {
 	$name = " ($test_name)";
     }
 
+    print_times;
+
     doprint "\n\n*******************************************\n";
     doprint     "*******************************************\n";
     doprint     "KTEST RESULT: TEST $i$name SUCCESS!!!!         **\n";