testrunner: fix updating of .testtimes file
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 31 Jan 2018 22:20:59 -0800
changeset 35895 69d7fcd91696
parent 35894 568917059243
child 35896 ef3a24a023ec
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
tests/run-tests.py
tests/test-run-tests.t
--- 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)