Skip to content

refactor docs_check#9970

Draft
luarss wants to merge 4 commits intoThe-OpenROAD-Project:masterfrom
luarss:doc-check-refactor
Draft

refactor docs_check#9970
luarss wants to merge 4 commits intoThe-OpenROAD-Project:masterfrom
luarss:doc-check-refactor

Conversation

@luarss
Copy link
Copy Markdown
Contributor

@luarss luarss commented Mar 27, 2026

Summary

  • Reduce readme_msgs_check single source of truth.
  • Rewrite readme_msgs_check to unittest -> eliminate .ok files
  • Remove fragile os.chdir actio

Type of Change

  • Reducing LOC, repeated code

Impact

Maintains doc tests behavior

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Related Issues

n/a

luarss added 2 commits March 27, 2026 03:46
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
- Replace doc_check_test() with py_test() in all 24 module BUILD files so test failures propagate via exit code, not log diff
- Delete 24 *_readme_msgs_check.ok snapshot files -> replace with unittest assertions

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@luarss luarss self-assigned this Mar 27, 2026
@luarss luarss marked this pull request as draft March 27, 2026 04:11
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Contributor

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

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 refactors the documentation check tests by replacing module-specific scripts and expected output files with a shared Python script accessed via symlinks. Corresponding Bazel BUILD files are updated to use standard py_test targets. Feedback includes updating the documentation to reflect the removal of .ok files and the transition to py_test, as well as avoiding the use of os.getcwd() for test output directories to ensure robustness within the Bazel environment.

os.environ.get("TEST_TMPDIR") or tempfile.mkdtemp()
- fix buildifier lints (tags after deps)
- fix docs

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Collaborator

@oharboe oharboe left a comment

Choose a reason for hiding this comment

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

@maliberty there has to be a bazel idiomatic way to do this to avoid the symlinks, but we need to keep the non-bazel testing flow, I suppose.

The docker image still has the non-bazel build, the non-bazel testing is required.

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