aboutsummaryrefslogtreecommitdiff
path: root/test/functional/combine_logs.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-03-25 15:16:26 +0100
committerMarcoFalke <falke.marco@gmail.com>2017-03-27 11:26:31 +0200
commitfa4535df574067700ed7d2227ae03605075b8730 (patch)
treef41e219d1f762c23fff9c5ea7c69e3d8f8d349e6 /test/functional/combine_logs.py
parenta0b1e57b20a17177ed5a9a54e4a8aab597a546b4 (diff)
[qa] combine_logs: Use ordered list for logfiles
Diffstat (limited to 'test/functional/combine_logs.py')
-rwxr-xr-xtest/functional/combine_logs.py7
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])