File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -347,13 +347,18 @@ def job(t, args):
347347 text = True ,
348348 )
349349 output += result .stderr
350- return output , result
350+ return output , result , t
351351
352352 jobs .append (fuzz_pool .submit (job , t , args ))
353353
354+ stats = []
354355 for future in as_completed (jobs ):
355- output , result = future .result ()
356+ output , result , target = future .result ()
356357 logging .debug (output )
358+ if using_libfuzzer :
359+ done_stat = [l for l in output .splitlines () if "DONE" in l ]
360+ assert len (done_stat ) == 1
361+ stats .append ((target , done_stat [0 ]))
357362 try :
358363 result .check_returncode ()
359364 except subprocess .CalledProcessError as e :
@@ -364,6 +369,13 @@ def job(t, args):
364369 logging .info (f"Target { result .args } failed with exit code { e .returncode } " )
365370 sys .exit (1 )
366371
372+ if using_libfuzzer :
373+ print ("Summary:" )
374+ max_len = max (len (t [0 ]) for t in stats )
375+ for t , s in sorted (stats ):
376+ t = t .ljust (max_len + 1 )
377+ print (f"{ t } { s } " )
378+
367379
368380def parse_test_list (* , fuzz_bin ):
369381 test_list_all = subprocess .run (
You can’t perform that action at this time.
0 commit comments