Patchwork [1,of,2,STABLE] test-profile: allow negative time in JSON output (issue5542)

login
register
mail settings
Submitter Yuya Nishihara
Date April 20, 2017, 3:09 p.m.
Message ID <86688d9fb4bcec3f4672.1492700980@mimosa>
Download mbox | patch
Permalink /patch/20270/
State Accepted
Headers show

Comments

Yuya Nishihara - April 20, 2017, 3:09 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1492695945 -32400
#      Thu Apr 20 22:45:45 2017 +0900
# Branch stable
# Node ID 86688d9fb4bcec3f4672aea9f2f94f5dd9af61c0
# Parent  59afb0750aecaff6c2b2e4edaab04eb91eca8a88
test-profile: allow negative time in JSON output (issue5542)

I don't know why it can be a negative number, but that shouldn't be important
here.
Augie Fackler - April 21, 2017, 7:42 p.m.
On Fri, Apr 21, 2017 at 12:09:40AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1492695945 -32400
> #      Thu Apr 20 22:45:45 2017 +0900
> # Branch stable
> # Node ID 86688d9fb4bcec3f4672aea9f2f94f5dd9af61c0
> # Parent  59afb0750aecaff6c2b2e4edaab04eb91eca8a88
> test-profile: allow negative time in JSON output (issue5542)

queued, thanks

Patch

diff --git a/tests/test-profile.t b/tests/test-profile.t
--- a/tests/test-profile.t
+++ b/tests/test-profile.t
@@ -90,7 +90,7 @@  Various statprof formatters work
 
   $ hg --profile --config profiling.statformat=json sleep 2>../out
   $ cat ../out
-  \[\[\d+.* (re)
+  \[\[-?\d+.* (re)
 
 statprof can be used as a standalone module