@@ -63,9 +63,8 @@ def build_test_matrix(mode, commits=None):
6363 key = lambda ebuild : [os .path .dirname (ebuild )] + version_key (ebuild )
6464 )
6565 name_to_channel = {
66- f"www-client/{ name } /" : channel
66+ f"www-client/{ make_name_from_channel ( channel )[ 0 ] } /" : channel
6767 for channel in CHANNELS
68- for name , _ in make_name_from_channel (channel )
6968 }
7069
7170 for ebuild in new_ebuilds :
@@ -80,7 +79,7 @@ def build_test_matrix(mode, commits=None):
8079 else :
8180 raise ValueError (f"Invalid mode '{ mode } '." )
8281
83- set_output ( "test_matrix" , json . dumps ( matrix ))
82+ return matrix
8483
8584
8685def main ():
@@ -115,17 +114,28 @@ def main():
115114 action = "store_true" ,
116115 help = "Obtain run ID from workflow_run event." ,
117116 )
117+ parser .add_argument (
118+ "--verbose" , "-v" ,
119+ action = "store_true" ,
120+ help = "Enable verbose output." ,
121+ )
118122 args = parser .parse_args ()
119123
120124 require_gha ()
121125
122126 if args .build_test_matrix :
123127 mode = "new-ebuilds" if args .new_ebuilds else "latest-ebuilds"
124- build_test_matrix (mode , commits = args .new_ebuilds or None )
128+ test_matrix = build_test_matrix (mode , commits = args .new_ebuilds or None )
129+ set_output ("test_matrix" , json .dumps (test_matrix ))
130+ if args .verbose :
131+ print (json .dumps (test_matrix , indent = 2 ))
132+
125133
126134 if args .collect_test_results :
127135 test_results = collect_test_results (from_event = args .from_event )
128136 set_output ("test_results" , json .dumps (test_results ))
137+ if args .verbose :
138+ print (json .dumps (test_results , indent = 2 ))
129139
130140
131141if __name__ == "__main__" :
0 commit comments