[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Wed Apr 7 13:59:02 MDT 2010


The branch, master has been updated
       via  2cf3585... selftest: Display minutes and hours for duration.
      from  baf81a0... LDB:python bindings - also empty LDB message elements should have a python representation

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2cf3585e52807eedfe80bffcd56fd6df4eec467b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Apr 7 17:54:57 2010 +0200

    selftest: Display minutes and hours for duration.

-----------------------------------------------------------------------

Summary of changes:
 selftest/format-subunit |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/format-subunit b/selftest/format-subunit
index 54949df..032b990 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -15,6 +15,18 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
 import subunithelper
 import subunit
 
+def format_time(t):
+    minutes, seconds = divmod(t, 60)
+    hours, minutes = divmod(minutes, 60)
+    ret = ""
+    if hours:
+        ret += "%dh" % hours
+    if minutes:
+        ret += "%dm" % minutes
+    ret += "%ds" % seconds
+    return ret
+
+
 class PlainFormatter(object):
 
     def __init__(self, summaryfile, verbose, immediate, statistics,
@@ -62,7 +74,7 @@ class PlainFormatter(object):
         out = "[%d" % self.index
         if self.totalsuites is not None:
             out += "/%d" % self.totalsuites
-        out += " in %ds" % duration
+        out += " in " + format_time(duration)
         if self.suitesfailed:
             out += ", %d errors" % (len(self.suitesfailed),)
         out += "] %s" % name 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list