From 5e34484187340501af4a861108bb107b99bfaa4a Mon Sep 17 00:00:00 2001 From: daiyongyuan <1533208939@qq.com> Date: Fri, 25 Sep 2026 23:25:50 +0800 Subject: [PATCH] Capture BEMU run output in log directory --- api/steps/bebop/bemu/02_sim_event.step.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/steps/bebop/bemu/02_sim_event.step.py b/api/steps/bebop/bemu/02_sim_event.step.py index 12d0103..bd6d481 100644 --- a/api/steps/bebop/bemu/02_sim_event.step.py +++ b/api/steps/bebop/bemu/02_sim_event.step.py @@ -176,11 +176,13 @@ async def handler(input_data: dict, ctx: FlowContext) -> None: library_env = f"LD_LIBRARY_PATH={shlex.quote(dependency_path)}:${{LD_LIBRARY_PATH:-}}" inner_cmd = f"cd {shlex.quote(binary_dir)} && {build_cmd} && {copy_cmd} && {library_env} exec {shlex.quote(binary_path)}" run_cmd = f"nix develop -c sh -c {shlex.quote(inner_cmd)}" + run_cmd = f"set -o pipefail; {run_cmd} 2>&1 | tee {shlex.quote(str(Path(run_log) / 'run.log'))}" ctx.logger.info(f"Running rushB BEMU: {run_cmd}") run_result = await stream_run_logger_async( cmd=run_cmd, logger=ctx.logger, cwd=bbdir, + executable="/bin/bash", stdout_prefix="rushB bemu", stderr_prefix="rushB bemu", task_scope=origin_tid, @@ -258,11 +260,13 @@ async def handler(input_data: dict, ctx: FlowContext) -> None: cargo_args.append(f"--{trace_name}") inner_cmd = f"cd {shlex.quote(binary_dir)} && {shlex.join(cargo_args)}" run_cmd = f"nix develop -c sh -c {shlex.quote(inner_cmd)}" + run_cmd = f"set -o pipefail; {run_cmd} 2>&1 | tee {shlex.quote(str(Path(run_log) / 'run.log'))}" ctx.logger.info(f"Running bebop bemu: {run_cmd}") run_result = await stream_run_logger_async( cmd=run_cmd, logger=ctx.logger, cwd=bbdir, + executable="/bin/bash", stdout_prefix="bebop bemu", stderr_prefix="bebop bemu", task_scope=origin_tid,