Skip to content

fix(report): classify metric generation errors as failures - #4695

Open
jinchuntan wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
jinchuntan:fix/report-metrics-generation-errors
Open

jinchuntan wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
jinchuntan:fix/report-metrics-generation-errors

Conversation

@jinchuntan

Copy link
Copy Markdown

Finished flows with errors in metadata-generate.log were listed under Passing designs. The reporter now classifies those runs as failing and keeps the generator errors attached to the design.

The regression tests cover generator errors. They also check that warnings are allowed and that a successful rerun clears the failure.

All 12 report tests pass. Black 26.5.1 passes for both changed files.

The full utility run executed 94 tests with 92 passing and one skipped because Yosys is unavailable. The remaining process visibility test also fails on unchanged master at 7bcaf47 because it cannot find the child process through /proc or ps in this workspace.

python3 flow/test/test_genReport.py
python3 -m black --check flow/util/genReport.py flow/test/test_genReport.py

The change was tested with log fixtures and a missing file error produced by the existing metric extractor. A full RTL to GDS flow was not run.

Prepared with Codex assistance.

Include metric generator errors when classifying completed flows.
A successful QoR check must not hide errors in metadata-generate.log.

Cover generator failures, warning-only logs and a successful metrics
rerun through the report CLI.

Prepared with Codex assistance.

Signed-off-by: Nigel Tan <79140620+jinchuntan@users.noreply.github.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 report generation utility to mark a design status as failing if there are errors in the metrics logs, and adds corresponding unit tests to verify this behavior. The feedback suggests adding a dummy metadata-check.log file in one of the new tests to prevent warnings from polluting the test output.

Comment on lines +194 to +200
def test_successful_metrics_regeneration_clears_the_failure(self):
self.write_file("logs/nangate45/gcd/base/6_report.log", "Finished\n")
self.write_file(
"reports/nangate45/gcd/base/metadata-generate.log",
"[ERROR] Failed to open file: missing.rpt\n",
)
self.assertIn("Failing designs", self.summary())

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.

medium

The test does not create a metadata-check.log file. Since the flow is marked as finished, genReport.py will attempt to parse metadata-check.log and print a Failed to open... warning to stdout when self.summary() is called. Creating a dummy metadata-check.log file will prevent this warning from polluting the test output.

Suggested change
def test_successful_metrics_regeneration_clears_the_failure(self):
self.write_file("logs/nangate45/gcd/base/6_report.log", "Finished\n")
self.write_file(
"reports/nangate45/gcd/base/metadata-generate.log",
"[ERROR] Failed to open file: missing.rpt\n",
)
self.assertIn("Failing designs", self.summary())
def test_successful_metrics_regeneration_clears_the_failure(self):
self.write_file("logs/nangate45/gcd/base/6_report.log", "Finished\\n")
self.write_file(
"reports/nangate45/gcd/base/metadata-generate.log",
"[ERROR] Failed to open file: missing.rpt\\n",
)
self.write_file(
"reports/nangate45/gcd/base/metadata-check.log",
"[INFO] QoR check: PASS\\n",
)
self.assertIn("Failing designs", self.summary())

Keep the metrics regeneration regression focused on the generator log.

Prepared with Codex assistance.

Signed-off-by: Nigel Tan <nigeltanjc@gmail.com>
@openroad-ci

openroad-ci commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 13f5ee9 · Jenkins build #2 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

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