File tree 1 file changed +17
-19
lines changed
1 file changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -582,34 +582,32 @@ def gen_coverage():
582
582
cmd .append ("--add-tracefile" )
583
583
cmd .append (t )
584
584
585
+ errors_to_ignore = [
586
+ "inconsistent" , "range" , "corrupt" , "category"
587
+ ]
588
+
585
589
cmd .append ("--output-file" )
586
590
cmd .append ("out/merged.info" )
587
- cmd .append ("--ignore-errors" )
588
- cmd .append ("inconsistent" )
589
- cmd .append ("--ignore-errors" )
590
- cmd .append ("range" )
591
- cmd .append ("--ignore-errors" )
592
- cmd .append ("corrupt" )
591
+ for e in errors_to_ignore :
592
+ cmd .append ("--ignore-errors" )
593
+ cmd .append (e )
593
594
594
595
if os .path .exists ("out/merged.info" ):
595
596
os .unlink ("out/merged.info" )
596
597
597
598
subprocess .run (cmd , check = True )
598
599
599
600
logging .info ("Generating HTML..." )
600
- subprocess .run (
601
- [
602
- "genhtml" ,
603
- "--ignore-errors" ,
604
- "inconsistent" ,
605
- "--ignore-errors" ,
606
- "range" ,
607
- "--output-directory" ,
608
- "out/coverage" ,
609
- "out/merged.info" ,
610
- ],
611
- check = True ,
612
- )
601
+ cmd = [ "genhtml" ]
602
+ for e in errors_to_ignore :
603
+ cmd .append ("--ignore-errors" )
604
+ cmd .append (e )
605
+
606
+ cmd .append ("--output-directory" )
607
+ cmd .append ("out/coverage" )
608
+ cmd .append ("out/merged.info" )
609
+
610
+ subprocess .run (cmd , check = True )
613
611
logging .info ("Coverage HTML should be available in out/coverage/index.html" )
614
612
615
613
You can’t perform that action at this time.
0 commit comments