From c6cfae144c5ea4a8760a4052e17dab7b5e4ad9d2 Mon Sep 17 00:00:00 2001 From: Johan Holmberg Date: Sat, 17 Sep 2016 22:42:17 +0200 Subject: [PATCH] report finished time --- bin/cmdtest.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/cmdtest.rb b/bin/cmdtest.rb index 3522f14..c10c327 100755 --- a/bin/cmdtest.rb +++ b/bin/cmdtest.rb @@ -463,7 +463,15 @@ module Cmdtest #---------------------------------------------------------------------- + START_TIME = Time.now + def self.print_summary(summary) + s = (Time.now - START_TIME).to_i + m, s = s.divmod(60) + h, m = m.divmod(60) + + puts "###" + puts "### Finished: %s, Elapsed: %02d:%02d:%02d" % [Time.now.strftime("%F %T"), h,m,s] puts puts "%s %d test classes, %d test methods, %d commands, %d errors, %d fatals." % [ summary["failures"] == 0 && summary["errors"] == 0 ? "###" : "---",