diff options
author | MarcoFalke <falke.marco@gmail.com> | 2017-03-28 14:44:53 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2017-03-28 14:45:07 +0200 |
commit | 5b029aaedb5fcf7cadd249607dd28eb3f233ab8c (patch) | |
tree | b8ff246a8dfc6bbfff9011f8d74df04993a104c8 /test | |
parent | 79af9fbd8c3c0e54702a9c92b171f134bd4466c8 (diff) | |
parent | fa4535df574067700ed7d2227ae03605075b8730 (diff) |
Merge #10076: [qa] combine_logs: Use ordered list for logfiles
fa4535d [qa] combine_logs: Use ordered list for logfiles (MarcoFalke)
Tree-SHA512: 66da6f2659018d24b1cac1f6d2ee8603c2c6f15ce5aff456e8e4b208874e97c7046b97112046d5b45bfd777b405771a3ad0a55036c4f4cdeec06842563af2c4d
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/combine_logs.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/combine_logs.py b/test/functional/combine_logs.py index 0c2f60172f..3ca74ea35e 100755 --- a/test/functional/combine_logs.py +++ b/test/functional/combine_logs.py @@ -6,8 +6,8 @@ to write to an outputfile.""" import argparse from collections import defaultdict, namedtuple -import glob import heapq +import itertools import os import re import sys @@ -49,7 +49,10 @@ def read_logs(tmp_dir): for each of the input log files.""" files = [("test", "%s/test_framework.log" % tmp_dir)] - for i, logfile in enumerate(glob.glob("%s/node*/regtest/debug.log" % tmp_dir)): + for i in itertools.count(): + logfile = "{}/node{}/regtest/debug.log".format(tmp_dir, i) + if not os.path.isfile(logfile): + break files.append(("node%d" % i, logfile)) return heapq.merge(*[get_log_events(source, f) for source, f in files]) |