@@ -220,16 +220,24 @@ def main(argv: list[str]) -> int:
220220 parser .add_argument ("linux_tree" , nargs = "?" )
221221 parser .add_argument ("--json" , action = "store_true" )
222222 parser .add_argument ("--require-pass" , action = "store_true" )
223+ parser .add_argument (
224+ "--report" ,
225+ default = str (REPORT ),
226+ help = f"status report path (default: { rel (REPORT )} )" ,
227+ )
223228 args = parser .parse_args (argv )
224229
230+ report_path = Path (args .report ).expanduser ()
231+ if not report_path .is_absolute ():
232+ report_path = ROOT / report_path
225233 report = build_report (candidate_linux_tree (args .linux_tree ))
226- REPORT .parent .mkdir (parents = True , exist_ok = True )
227- REPORT .write_text (json .dumps (report , indent = 2 , sort_keys = True ) + "\n " , encoding = "utf-8" )
234+ report_path .parent .mkdir (parents = True , exist_ok = True )
235+ report_path .write_text (json .dumps (report , indent = 2 , sort_keys = True ) + "\n " , encoding = "utf-8" )
228236 if args .json :
229237 print (json .dumps (report , indent = 2 , sort_keys = True ))
230238 else :
231239 print (f"STATUS: { report ['status' ].upper ()} linux.external_bsp_status" )
232- print (f" report: { rel (REPORT )} " )
240+ print (f" report: { rel (report_path )} " )
233241 for key , value in report ["producer_commands" ].items ():
234242 print (f" command.{ key } : { value } " )
235243 for blocker in report ["blockers" ]:
0 commit comments