From 4d81aa099c193335f5ee272816f6e05dd8e9bffb Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 31 Dec 2015 13:16:24 +0100 Subject: [PATCH] tests: show start & end date of the whole run --- tests/test.d/controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test.d/controller.rb b/tests/test.d/controller.rb index d70bcf536..482998d2a 100644 --- a/tests/test.d/controller.rb +++ b/tests/test.d/controller.rb @@ -1,3 +1,4 @@ +# coding: utf-8 class Controller attr_accessor :test_failed, :test_new, :test_date_after, :teset_date_before, :update_failed, :num_failed, :record_duration attr_reader :num_threads, :results @@ -69,7 +70,8 @@ class Controller duration = Time.now - start - show_message "#{@num_failed}/#{num_tests} failed (" + (num_tests > 0 ? (@num_failed * 100 / num_tests).to_s : "0") + "%). " + "Tests took #{duration}s." + show_message "#{@num_failed}/#{num_tests} failed (" + (num_tests > 0 ? (@num_failed * 100 / num_tests).to_s : "0") + "%). " + + "Tests took #{duration}s (#{start.strftime("%Y-%m-%m %H:%M:%S")} – #{duration.strftime("%Y-%m-%m %H:%M:%S")})" end def run_threads