summaryrefslogtreecommitdiff
path: root/tools/test.py
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2018-04-27 14:17:30 -0400
committerTrivikram Kamat <16024985+trivikr@users.noreply.github.com>2018-05-02 22:22:12 -0700
commitab15198471cdd62b9c98619b033ac17f0f56d01e (patch)
tree1e3121472e79a98949896cc30a42eef9fce4002c /tools/test.py
parent516349d99cd64448f88899485352753f847b1ae9 (diff)
downloadandroid-node-v8-ab15198471cdd62b9c98619b033ac17f0f56d01e.tar.gz
android-node-v8-ab15198471cdd62b9c98619b033ac17f0f56d01e.tar.bz2
android-node-v8-ab15198471cdd62b9c98619b033ac17f0f56d01e.zip
tools: fix TypeError from `test.py --time`
Calculated durations are timedelta objects but the FormatTime function is expecting a number in seconds. PR-URL: https://github.com/nodejs/node/pull/20368 Fixes: https://github.com/nodejs/node/issues/20341 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'tools/test.py')
-rwxr-xr-xtools/test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/test.py b/tools/test.py
index a0a3121e48..66b9c7291f 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -1747,7 +1747,7 @@ def Main():
timed_tests.sort(lambda a, b: a.CompareTime(b))
index = 1
for entry in timed_tests[:20]:
- t = FormatTime(entry.duration)
+ t = FormatTime(entry.duration.total_seconds())
sys.stderr.write("%4i (%s) %s\n" % (index, t, entry.GetLabel()))
index += 1