File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
test/functional/test_framework Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
5
"""Base class for RPC testing."""
6
6
7
+ from collections import deque
7
8
import logging
8
9
import optparse
9
10
import os
@@ -177,12 +178,17 @@ def main(self):
177
178
# Dump the end of the debug logs, to aid in debugging rare
178
179
# travis failures.
179
180
import glob
180
- filenames = glob .glob (self .options .tmpdir + "/node*/regtest/debug.log" )
181
+ filenames = [self .options .tmpdir + "/test_framework.log" ]
182
+ filenames += glob .glob (self .options .tmpdir + "/node*/regtest/debug.log" )
181
183
MAX_LINES_TO_PRINT = 1000
182
- for f in filenames :
183
- print ("From" , f , ":" )
184
- from collections import deque
185
- print ("" .join (deque (open (f ), MAX_LINES_TO_PRINT )))
184
+ for fn in filenames :
185
+ try :
186
+ with open (fn , 'r' ) as f :
187
+ print ("From" , fn , ":" )
188
+ print ("" .join (deque (f , MAX_LINES_TO_PRINT )))
189
+ except OSError :
190
+ print ("Opening file %s failed." % fn )
191
+ traceback .print_exc ()
186
192
if success :
187
193
self .log .info ("Tests successful" )
188
194
sys .exit (self .TEST_EXIT_PASSED )
You can’t perform that action at this time.
0 commit comments