changeset 35855:69d7fcd91696

testrunner: fix updating of .testtimes file We attempt to write the 5 most recent test timings to a file called .testtimes, but we read previous results from a file called .testtimes- (including the hyphen), so we ended up no more than a single time per test. Differential Revision: https://phab.mercurial-scm.org/D1961
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 31 Jan 2018 22:20:59 -0800
parents 568917059243
children ef3a24a023ec
files tests/run-tests.py tests/test-run-tests.t
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Wed Jan 31 23:12:45 2018 -0800
+++ b/tests/run-tests.py	Wed Jan 31 22:20:59 2018 -0800
@@ -2017,7 +2017,7 @@
 def loadtimes(outputdir):
     times = []
     try:
-        with open(os.path.join(outputdir, b'.testtimes-')) as fp:
+        with open(os.path.join(outputdir, b'.testtimes')) as fp:
             for line in fp:
                 m = re.match('(.*?) ([0-9. ]+)', line)
                 times.append((m.group(1),
--- a/tests/test-run-tests.t	Wed Jan 31 23:12:45 2018 -0800
+++ b/tests/test-run-tests.t	Wed Jan 31 22:20:59 2018 -0800
@@ -374,6 +374,7 @@
   </testsuite>
 
   $ cat .testtimes
+  test-empty.t * (glob)
   test-failure-unicode.t * (glob)
   test-failure.t * (glob)
   test-success.t * (glob)