@@ -231,13 +231,17 @@ def _mayhem_run_impl(ctx):
231231
232232 # For mayhem wait
233233 wait_args = []
234+ show_args = []
234235 if ctx .attr .wait :
235236 if not ctx .attr .duration :
236237 fail ("The 'wait' attribute requires the 'duration' attribute to be set (otherwise, we will wait forever)" )
237238 wait_args .append ("wait" )
239+ show_args .append ("show" )
238240 if ctx .attr .owner :
239241 wait_args .append ("--owner" )
240242 wait_args .append (ctx .attr .owner )
243+ show_args .append ("--owner" )
244+ show_args .append (ctx .attr .owner )
241245 if ctx .attr .junit :
242246 wait_args .append ("--junit" )
243247 wait_args .append (ctx .attr .junit )
@@ -281,6 +285,7 @@ def resolve_runfile_mayhem_cli_path(mayhem_cli_short_path):
281285mayhem_cli = resolve_runfile_mayhem_cli_path("{mayhem_cli}")
282286run_args = {run_args}
283287wait_args = {wait_args}
288+ show_args = {show_args}
284289
285290if "{package_basename}":
286291 if runfiles_enabled:
@@ -314,7 +319,7 @@ if wait_args:
314319 sys.exit(wait_result.returncode)
315320
316321 # Mayhem show
317- show_result = subprocess.run([mayhem_cli, "show", run_id], capture_output=True, text=True)
322+ show_result = subprocess.run([mayhem_cli] + show_args + [ run_id], capture_output=True, text=True)
318323 print(show_result.stdout)
319324 if show_result.returncode != 0:
320325 print(show_result.stderr, file=sys.stderr)
@@ -326,6 +331,7 @@ if wait_args:
326331 package_basename = package_basename ,
327332 run_args = run_args ,
328333 wait_args = wait_args ,
334+ show_args = show_args ,
329335 )
330336
331337 if is_windows :
@@ -515,4 +521,4 @@ mayhem_download = rule(
515521 allow_single_file = True ,
516522 ),
517523 },
518- )
524+ )
0 commit comments