47
47
parser .add_argument ('--tree-name' , help = 'the tree name to expect' )
48
48
parser .add_argument ('--result-dir' ,
49
49
help = 'the directory where results will be generated' )
50
+ parser .add_argument ('--dbg-print-run' , help = 'print results of previous run' )
50
51
51
52
52
53
def get_console_width ():
@@ -152,7 +153,7 @@ def print_summary_series(print_state, files, full_path, patch_id):
152
153
print ('' , flush = True )
153
154
154
155
155
- def print_test_summary (args , series , print_state ):
156
+ def print_test_summary (args , series , print_state , tests = None ):
156
157
"""
157
158
Report results based on files created by the tester in the filesystem.
158
159
Track which files we have already as this function should be called
@@ -172,6 +173,10 @@ def print_test_summary(args, series, print_state):
172
173
seen .add (full_path )
173
174
174
175
rel_path = full_path [len (args .result_dir ) + 1 :].split ('/' )
176
+ test_name = os .path .basename (full_path )
177
+
178
+ if tests and test_name not in tests :
179
+ continue
175
180
176
181
patch_id = - 1
177
182
if len (rel_path ) == 3 :
@@ -225,7 +230,10 @@ def run_tester(args, tree, series):
225
230
def load_patches (args ):
226
231
""" Load patches from specified location on disk """
227
232
228
- series_id = get_series_id (args .result_dir )
233
+ if args .dbg_print_run is None :
234
+ series_id = get_series_id (args .result_dir )
235
+ else :
236
+ series_id = int (args .dbg_print_run )
229
237
230
238
log_open_sec ("Loading patches" )
231
239
try :
@@ -291,6 +299,10 @@ def main():
291
299
292
300
print_series_info (series )
293
301
302
+ if args .dbg_print_run :
303
+ print_test_summary (args , series , {}, tests = {'ynl' , 'build_clang' })
304
+ return
305
+
294
306
try :
295
307
tree = Tree (tree_name , tree_name , args .tree , current_branch = True )
296
308
except cmd .CmdError :
0 commit comments