@@ -145,6 +145,7 @@ def RunSingle(self, parallel, thread_id):
145
145
sys .platform == 'sunos5' and
146
146
'ECONNREFUSED' in output .output .stderr ):
147
147
output = case .Run ()
148
+ output .diagnostic .append ('ECONNREFUSED received, test retried' )
148
149
case .duration = (datetime .now () - start )
149
150
except IOError , e :
150
151
return
@@ -255,6 +256,10 @@ def HasRun(self, output):
255
256
256
257
class TapProgressIndicator (SimpleProgressIndicator ):
257
258
259
+ def _printDiagnostic (self , messages ):
260
+ for l in messages .splitlines ():
261
+ logger .info ('# ' + l )
262
+
258
263
def Starting (self ):
259
264
logger .info ('1..%i' % len (self .cases ))
260
265
self ._done = 0
@@ -270,14 +275,13 @@ def HasRun(self, output):
270
275
if FLAKY in output .test .outcomes and self .flaky_tests_mode == DONTCARE :
271
276
status_line = status_line + ' # TODO : Fix flaky test'
272
277
logger .info (status_line )
278
+ self ._printDiagnostic ("\n " .join (output .diagnostic ))
273
279
274
280
if output .HasTimedOut ():
275
- logger . info ( '# TIMEOUT' )
281
+ self . _printDiagnostic ( ' TIMEOUT' )
276
282
277
- for l in output .output .stderr .splitlines ():
278
- logger .info ('#' + l )
279
- for l in output .output .stdout .splitlines ():
280
- logger .info ('#' + l )
283
+ self ._printDiagnostic (output .output .stderr )
284
+ self ._printDiagnostic (output .output .stdout )
281
285
else :
282
286
skip = skip_regex .search (output .output .stdout )
283
287
if skip :
@@ -288,6 +292,7 @@ def HasRun(self, output):
288
292
if FLAKY in output .test .outcomes :
289
293
status_line = status_line + ' # TODO : Fix flaky test'
290
294
logger .info (status_line )
295
+ self ._printDiagnostic ("\n " .join (output .diagnostic ))
291
296
292
297
duration = output .test .duration
293
298
@@ -490,6 +495,7 @@ def __init__(self, test, command, output, store_unexpected_output):
490
495
self .command = command
491
496
self .output = output
492
497
self .store_unexpected_output = store_unexpected_output
498
+ self .diagnostic = []
493
499
494
500
def UnexpectedOutput (self ):
495
501
if self .HasCrashed ():
0 commit comments