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
--- 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)