Skip to content

flow: route 'run' target through run_command.py for consistent logging - #4340

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:run-tee-consistency
Jul 8, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
oharboe:run-tee-consistency

Conversation

@oharboe

@oharboe oharboe commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Every flow stage logs through $(RUN_CMD) --log ... --tee -- ... (scripts/run_command.py) except the generic run target, which was the lone holdout still shelling out to 2>&1 | tee. Route it through run_command.py like the rest.

This is a consistency cleanup, not a bugfix: .SHELLFLAGS already sets -o pipefail, so the old pipeline propagated OpenROAD's exit status correctly, and run_command.py returns the child's returncode, so exit behavior is unchanged. One logging mechanism instead of two reduces cognitive load and removes a copy-and-paste divergence.

As a side effect, the run target now gains the per-step timing and peak-memory line run_command.py emits for every other stage, and the RUNFILES_* scrubbing that keeps a parent Bazel invocation's runfiles environment from leaking into the OpenROAD subprocess.

Every flow stage logs through `$(RUN_CMD) --log ... --tee -- ...`
(scripts/run_command.py) except the generic `run` target, which was the
lone holdout still shelling out to `2>&1 | tee`. Route it through
run_command.py like the rest.

This is a consistency cleanup, not a bugfix: .SHELLFLAGS already sets
`-o pipefail`, so the old pipeline propagated OpenROAD's exit status
correctly, and run_command.py returns the child's returncode, so exit
behavior is unchanged. One logging mechanism instead of two reduces
cognitive load and removes a copy-and-paste divergence.

As a side effect, the `run` target now gains the per-step timing and
peak-memory line run_command.py emits for every other stage, and the
RUNFILES_* scrubbing that keeps a parent Bazel invocation's runfiles
environment from leaking into the OpenROAD subprocess.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the run target in flow/Makefile to execute the OpenROAD command via $(RUN_CMD) with logging options instead of using a subshell with tee. The reviewer suggests adding a fallback mechanism for RUN_LOG_NAME_STEM using GNU Make's $(or ...) function to prevent generating a hidden .log file when the variable is undefined.

Comment thread flow/Makefile Resolved
@oharboe
oharboe requested a review from maliberty July 8, 2026 12:18
@maliberty

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 70ec619f3f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@maliberty
maliberty merged commit 4a68ecf into The-OpenROAD-Project:master Jul 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants