diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2013-05-07 11:59:22 -0700 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2013-05-07 13:13:44 -0700 |
commit | ee4f0baeac8ac6f26f7ed6ca96f8b70250e9fd17 (patch) | |
tree | c649404ff70c5a68ac9e2958964e7ec83767b3e2 /tools | |
parent | a90dc41df2a10858e7135cab55af335da9bc4b05 (diff) | |
download | android-node-v8-ee4f0baeac8ac6f26f7ed6ca96f8b70250e9fd17.tar.gz android-node-v8-ee4f0baeac8ac6f26f7ed6ca96f8b70250e9fd17.tar.bz2 android-node-v8-ee4f0baeac8ac6f26f7ed6ca96f8b70250e9fd17.zip |
test: report test duration in TAP progress
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/test.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/test.py b/tools/test.py index 342614e63b..90d39c8117 100755 --- a/tools/test.py +++ b/tools/test.py @@ -39,6 +39,7 @@ import subprocess import sys import tempfile import time +import datetime import threading from Queue import Queue, Empty import utils @@ -113,9 +114,9 @@ class ProgressIndicator(object): self.AboutToRun(case) self.lock.release() try: - start = time.time() + start = datetime.datetime.now() output = case.Run() - case.duration = (time.time() - start) + case.duration = (datetime.datetime.now() - start) except IOError, e: assert self.terminate return @@ -240,6 +241,12 @@ class TapProgressIndicator(SimpleProgressIndicator): else: print 'ok %i - %s' % (self._done, command) + duration = output.test.duration + + print ' ---' + print ' duration_ms: %d.%d' % (duration.total_seconds(), duration.microseconds / 1000) + print ' ...' + def Done(self): pass |