@@ -455,6 +455,14 @@ def filter_devices(grp_list, devices: "Mapping[Device, List[LogFileResult]]", in
455
455
456
456
return tests
457
457
458
+ def macro_test_name (test ):
459
+ sanitized_name = (
460
+ test .test_name
461
+ .replace ("_" , "\\ _" )
462
+ .replace ("&" , "\\ &" )
463
+ )
464
+ return f"\\ tableTestName{{{ test .test_name } }}{{{ sanitized_name } }}"
465
+
458
466
def macro_result_name (device , test ):
459
467
return f"\\ csname { device .name } -{ test .test_name } result\\ endcsname"
460
468
@@ -646,7 +654,7 @@ def _write_combo_tablular_with_distribution(f, devices, tests, rows):
646
654
tab_shape += "l "
647
655
tab_shape += device_cols_ls
648
656
tab_shape += " l"
649
- f .write ("\\ begin{tabular }{%s}\n " % tab_shape )
657
+ f .write ("\\ begin{longtable }{%s}\n " % tab_shape )
650
658
651
659
# first line
652
660
# Type & Name & multicol{3}{rpi4} & multicol{3}{qemu} & etc
@@ -674,7 +682,7 @@ def _write_combo_tablular_with_distribution(f, devices, tests, rows):
674
682
continue
675
683
f .write (f"{ c !s:>{maxlen }} & " )
676
684
f .write ("\\ \\ \\ hline \n " )
677
- f .write ("\\ end{tabular }\n " )
685
+ f .write ("\\ end{longtable }\n " )
678
686
679
687
def _write_combo_tablular_simple (f , devices , tests , rows ):
680
688
all_groups = set (g for ftest in tests .values () for g in ftest .groups if g != "all" )
@@ -696,7 +704,7 @@ def _write_combo_tablular_simple(f, devices, tests, rows):
696
704
tab_shape += device_cols_ls
697
705
tab_shape += " l"
698
706
699
- f .write ("\\ begin{tabular }{%s}\n " % tab_shape )
707
+ f .write ("\\ begin{longtable }{%s}\n " % tab_shape )
700
708
701
709
# first line
702
710
# Type & Name & multicol{3}{rpi4} & multicol{3}{qemu} & etc
@@ -716,7 +724,7 @@ def _write_combo_tablular_simple(f, devices, tests, rows):
716
724
continue
717
725
f .write (f"{ c !s} & " )
718
726
f .write ("\\ \\ \\ hline \n " )
719
- f .write ("\\ end{tabular }\n " )
727
+ f .write ("\\ end{longtable }\n " )
720
728
721
729
722
730
# def write_results_macros(f, devices, tests):
@@ -747,7 +755,10 @@ def write_combo_table(f, devices: "Mapping[Device, List[LogFileResult]]", tests,
747
755
group = groups [- 1 ]
748
756
# use verb to escape test and group names with symbols
749
757
row .append (f"\\ verb|{ group } |" )
750
- row .append (f"\\ verb|{ test_name } |" )
758
+ if args .macros :
759
+ row .append (macro_test_name (ftest ))
760
+ else :
761
+ row .append (f"\\ verb|{ test_name } |" )
751
762
752
763
for d in devices :
753
764
flog = tests [test_name ].results [d ]
@@ -861,6 +872,7 @@ def main(args):
861
872
with open (args .standalone_file , "w" ) as f :
862
873
f .write ("\\ documentclass{standalone}\n " )
863
874
f .write ("\\ begin{document}\n " )
875
+ f .write ("\\ usepackage{longtable}\n " )
864
876
865
877
if args .macros :
866
878
write_results_macros (f , devices , filtered_tests )
0 commit comments