Patchwork D1960: testrunner: make reading of test times work with #testcases

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 10:43 p.m.
Message ID <20a1bdf113a2a037c25fba00a61a60e0@localhost.localdomain>
Download mbox | patch
Permalink /patch/27158/
State Not Applicable
Headers show

Comments

phabricator - Feb. 1, 2018, 10:43 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG568917059243: testrunner: make reading of test times work with #testcases (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1960?vs=5034&id=5088

REVISION DETAIL
  https://phab.mercurial-scm.org/D1960

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2019,8 +2019,9 @@ 
     try:
         with open(os.path.join(outputdir, b'.testtimes-')) as fp:
             for line in fp:
-                ts = line.split()
-                times.append((ts[0], [float(t) for t in ts[1:]]))
+                m = re.match('(.*?) ([0-9. ]+)', line)
+                times.append((m.group(1),
+                              [float(t) for t in m.group(2).split()]))
     except IOError as err:
         if err.errno != errno.ENOENT:
             raise