diff options
author | Richard Lau <riclau@uk.ibm.com> | 2018-04-27 14:17:30 -0400 |
---|---|---|
committer | Trivikram Kamat <16024985+trivikr@users.noreply.github.com> | 2018-05-02 22:22:12 -0700 |
commit | ab15198471cdd62b9c98619b033ac17f0f56d01e (patch) | |
tree | 1e3121472e79a98949896cc30a42eef9fce4002c /tools/test.py | |
parent | 516349d99cd64448f88899485352753f847b1ae9 (diff) | |
download | android-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-x | tools/test.py | 2 |
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 |