Skip to content

docs: cover binding tests for expensive commands#10757

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:docs-testing-strategy
Jun 25, 2026
Merged

docs: cover binding tests for expensive commands#10757
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:docs-testing-strategy

Conversation

@maliberty

Copy link
Copy Markdown
Member

Extends docs/agents/testing-strategy.md to cover the case the Tier-2 recipe doesn't: commands whose execution is expensive (global_route, global_placement, clock_tree_synthesis, detailed_route), where "run it once on a trivial design" is the wrong cost trade-off.

  • States the preferred policy: validate arguments in C++, not in the binding — a .tcl check only guards the Tcl path, while a check behind the C++ entry point (via utl::Validator) covers Tcl, Python, and direct C++ callers from one place.
  • Explains how to prove the translation contract without executing the engine: rename the thin execute free function to a spy so argument handling runs but the algorithm doesn't.
  • Documents the three real binding shapes (setters + separate execute; args forwarded to C++; fused configure+execute) and what to assert in each, with detailed_route_cmd called out as the fused outlier worth refactoring.
  • Cross-links from the Tier-2 section and adds a line to the decision tree.

@maliberty maliberty self-assigned this Jun 25, 2026
@maliberty maliberty marked this pull request as ready for review June 25, 2026 21:11
@maliberty maliberty requested a review from a team as a code owner June 25, 2026 21:11
@maliberty maliberty requested a review from precisionmoon June 25, 2026 21:11

@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 testing strategy documentation to outline a strategy for testing expensive commands. It recommends validating arguments in C++ and separating the configuration/marshalling step from the execution step so that binding tests can spy on the execution without running the expensive algorithm. The review feedback focuses on improving the documentation's accuracy and consistency, specifically by standardizing the spelling of 'marshaling', correcting Python terminology (using 'function' instead of 'proc'), and clarifying how Python tests can mock or reassign functions similarly to Tcl's 'rename' command.

Comment thread docs/agents/testing-strategy.md Outdated
Comment thread docs/agents/testing-strategy.md Outdated
Comment thread docs/agents/testing-strategy.md Outdated
Comment thread docs/agents/testing-strategy.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b57dd5bf87

ℹ️ 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".

Comment thread docs/agents/testing-strategy.md Outdated
Add a 'Binding tests for expensive commands' section to
docs/agents/testing-strategy.md: prefer validating arguments in C++
(via utl::Validator) so checks cover Tcl/Python/C++ uniformly, and prove
the Tcl/Python->C++ translation by spying the thin execute free function
instead of running the engine. Notes the three binding shapes and that
pre-execute guards require a minimal DB for spy tests.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@openroad-ci openroad-ci force-pushed the docs-testing-strategy branch from db2ce18 to 713b984 Compare June 25, 2026 21:24
@maliberty maliberty merged commit daa0fbe into The-OpenROAD-Project:master Jun 25, 2026
12 of 16 checks passed
@maliberty maliberty deleted the docs-testing-strategy branch June 25, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant