File tree Expand file tree Collapse file tree 2 files changed +19
-9
lines changed
Expand file tree Collapse file tree 2 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -20,9 +20,21 @@ class PatchtestResults:
2020 def __init__ (self , target_repo , series ):
2121 self .target_repo = target_repo
2222 self .series = series
23- self .mbox_signed_off_by_results = [test_mbox_signed_off_by_presence (patch ) for patch in self .series .patchdata ]
24- self .mbox_shortlog_format_results = [test_mbox_shortlog_format (patch ) for patch in self .series .patchdata ]
25- self .mbox_commit_message_presence_results = [test_mbox_commit_message_presence (patch ) for patch in self .series .patchdata ]
23+ self .mbox_results = dict (
24+ [
25+ ('signed_off_by' , [test_mbox_signed_off_by_presence (patch ) for
26+ patch in self .series .patchdata ]),
27+ ('shortlog_format' , [test_mbox_shortlog_format (patch ) for patch
28+ in self .series .patchdata ]),
29+ ('commit_message_presence' ,
30+ [test_mbox_commit_message_presence (patch ) for patch in
31+ self .series .patchdata ]),
32+ ]
33+ )
34+
35+ def print_mbox_results (self , tag ):
36+ for testresult in self .mbox_results [tag ]:
37+ print (testresult )
2638
2739# test_for_pattern()
2840# @pattern: a pyparsing regex object
Original file line number Diff line number Diff line change @@ -8,9 +8,7 @@ def run():
88 target_repo = TargetRepo (args .repodir )
99 series = PatchSeries (args .patch_path )
1010 results = PatchtestResults (target_repo , series )
11- for testresult in results .mbox_signed_off_by_results :
12- print (testresult )
13- for testresult in results .mbox_shortlog_format_results :
14- print (testresult )
15- for testresult in results .mbox_commit_message_presence_results :
16- print (testresult )
11+
12+ results .print_mbox_results ('signed_off_by' )
13+ results .print_mbox_results ('shortlog_format' )
14+ results .print_mbox_results ('commit_message_presence' )
You can’t perform that action at this time.
0 commit comments