Mercurial > hg
comparison tests/run-tests.py @ 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 | 04304b779df1 |
comparison
equal
deleted
inserted
replaced
35854:568917059243 | 35855:69d7fcd91696 |
---|---|
2015 # newest. | 2015 # newest. |
2016 | 2016 |
2017 def loadtimes(outputdir): | 2017 def loadtimes(outputdir): |
2018 times = [] | 2018 times = [] |
2019 try: | 2019 try: |
2020 with open(os.path.join(outputdir, b'.testtimes-')) as fp: | 2020 with open(os.path.join(outputdir, b'.testtimes')) as fp: |
2021 for line in fp: | 2021 for line in fp: |
2022 m = re.match('(.*?) ([0-9. ]+)', line) | 2022 m = re.match('(.*?) ([0-9. ]+)', line) |
2023 times.append((m.group(1), | 2023 times.append((m.group(1), |
2024 [float(t) for t in m.group(2).split()])) | 2024 [float(t) for t in m.group(2).split()])) |
2025 except IOError as err: | 2025 except IOError as err: |