Changeset 3a32b3a for tests/pybin


Ignore:
Timestamp:
Jul 10, 2020, 11:42:41 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
20ab637, 2fc94ced, fb98462
Parents:
732b406 (diff), 49cad912 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
tests/pybin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/test_run.py

    r732b406 r3a32b3a  
    6969                        else :                                          text = "FAILED with code %d" % retcode
    7070
    71                 text += "    C%s - R%s" % (cls.fmtDur(duration[0]), cls.fmtDur(duration[1]))
     71                text += "    C%s - R%s" % (fmtDur(duration[0]), fmtDur(duration[1]))
    7272                return text
    73 
    74         @staticmethod
    75         def fmtDur( duration ):
    76                 if duration :
    77                         hours, rem = divmod(duration, 3600)
    78                         minutes, rem = divmod(rem, 60)
    79                         seconds, millis = divmod(rem, 1)
    80                         return "%2d:%02d.%03d" % (minutes, seconds, millis * 1000)
    81                 return " n/a"
  • tests/pybin/tools.py

    r732b406 r3a32b3a  
    387387                while True:
    388388                        yield i.next(max(expire - time.time(), 0))
     389
     390def fmtDur( duration ):
     391        if duration :
     392                hours, rem = divmod(duration, 3600)
     393                minutes, rem = divmod(rem, 60)
     394                seconds, millis = divmod(rem, 1)
     395                return "%2d:%02d.%03d" % (minutes, seconds, millis * 1000)
     396        return " n/a"
Note: See TracChangeset for help on using the changeset viewer.