Skip to content

Commit 358e136

Browse files
committed
Merge branch 'master' into cts_fix_exiting_tree_identification
2 parents 460aa25 + e077b67 commit 358e136

258 files changed

Lines changed: 150341 additions & 84661 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
- [ ] I have verified that the local build succeeds (`./etc/Build.sh`).
1717
- [ ] I have run the relevant tests and they pass.
1818
- [ ] My code follows the repository's formatting guidelines.
19+
<!-- Delete next item if this PR is not a bug fix or new feature -->
20+
- [ ] I have included tests to prevent regressions.
1921
- [ ] **I have signed my commits (DCO).**
2022

2123
## Related Issues

.github/workflows/github-actions-format-on-push.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ jobs:
2323
run: |
2424
clang-format --version
2525
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
26-
if [[ "${file##*.}" =~ ^(h|C|cc|cp|cpp|c++|CPP|cxx|hh)$ && "${file}" != "src/sta/"* && "${file}" != "src/odb/src/codeGenerator/"* ]]; then
26+
if [[ "${file##*.}" =~ ^(h|C|cc|cp|cpp|c++|CPP|cxx|hh)$ \
27+
&& "${file}" != "src/sta/"* \
28+
&& "${file}" != "src/odb/src/codeGenerator/"* \
29+
&& "${file}" != "third-party/"* ]]; then
2730
clang-format --dry-run --Werror $file
2831
fi
2932
done

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,5 @@ projectview.bazelproject
6666
.bazelbsp/
6767
/buildifier
6868
tmp/
69+
70+
.playwright-mcp

BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ cc_binary(
197197
"//src/gui",
198198
"//src/sta:opensta_lib",
199199
"//src/utl",
200+
"//src/web",
200201
"@boost.stacktrace",
201202
"@rules_cc//cc/runfiles", # sets BAZEL_CURRENT_REPOSITORY
202203
"@tcl_lang//:tcl",
@@ -512,6 +513,7 @@ sh_test(
512513
srcs = ["//bazel:bzl_lint_test.sh"],
513514
args = ["$(rootpath @buildifier_prebuilt//:buildifier)"],
514515
data = [
516+
"MODULE.bazel",
515517
"@buildifier_prebuilt//:buildifier",
516518
],
517519
tags = ["local"],
@@ -525,6 +527,7 @@ sh_test(
525527
srcs = ["//bazel:bzl_fmt_test.sh"],
526528
args = ["$(rootpath @buildifier_prebuilt//:buildifier)"],
527529
data = [
530+
"MODULE.bazel",
528531
"@buildifier_prebuilt//:buildifier",
529532
],
530533
tags = ["local"],
@@ -571,6 +574,7 @@ sh_binary(
571574
"$(rootpath @buildifier_prebuilt//:buildifier)",
572575
],
573576
data = [
577+
"MODULE.bazel",
574578
"tclint.toml",
575579
"//bazel:bzl_lint_test.sh",
576580
"//bazel:bzl_tidy.sh",

bazel/bison.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ def correct_bison_env_for_action(env, bison):
2929

3030
bison_env["BISON_PKGDATADIR"] = bison_env["BISON_PKGDATADIR"].replace(
3131
bison_runfiles_dir,
32-
"external/{}".format(bison.owner.workspace_name),
32+
"external/{}".format(bison.owner.workspace_name), # buildifier: disable=external-path
3333
)
3434
bison_env["M4"] = bison_env["M4"].replace(
3535
bison_runfiles_dir,
36-
"{}/external/{}".format(bison.root.path, bison.owner.workspace_name),
36+
"{}/external/{}".format(bison.root.path, bison.owner.workspace_name), # buildifier: disable=external-path
3737
)
3838

3939
return bison_env

bazel/bzl_fmt_test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
#
55
# Check that all Bazel files are properly formatted (no lint warnings).
66
set -euo pipefail
7-
TOOL="$(readlink -f "$1")"
8-
WORKSPACE="$(dirname "$(readlink -f MODULE.bazel)")"
7+
TOOL="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
8+
# MODULE.bazel must be in the sh_test `data` deps so it appears as a
9+
# runfiles symlink pointing at the real workspace. `readlink` (no -f,
10+
# for macOS portability) resolves the absolute path Bazel wrote.
11+
[ -L MODULE.bazel ] || { echo "MODULE.bazel missing from runfiles" >&2; exit 1; }
12+
WORKSPACE="$(dirname "$(readlink MODULE.bazel)")"
913
cd "$WORKSPACE"
1014
# `git ls-files` skips submodule contents (src/sta, third-party/abc).
1115
# Explicit -mode=check -lint=off separates format errors from lint warnings,

bazel/bzl_lint_test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
#
55
# Lint all Bazel files using buildifier (check-only, with lint warnings).
66
set -euo pipefail
7-
TOOL="$(readlink -f "$1")"
8-
WORKSPACE="$(dirname "$(readlink -f MODULE.bazel)")"
7+
TOOL="$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
8+
# MODULE.bazel must be in the sh_test `data` deps so it appears as a
9+
# runfiles symlink pointing at the real workspace. `readlink` (no -f,
10+
# for macOS portability) resolves the absolute path Bazel wrote.
11+
[ -L MODULE.bazel ] || { echo "MODULE.bazel missing from runfiles" >&2; exit 1; }
12+
WORKSPACE="$(dirname "$(readlink MODULE.bazel)")"
913
cd "$WORKSPACE"
1014
# `git ls-files` skips submodule contents (src/sta, third-party/abc), so
1115
# we never try to reformat files owned by another repo.

bazel/flex.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _correct_flex_env_for_action(env, flex):
2626
flex.owner.workspace_name,
2727
)
2828

29-
actual = "{}/external/{}".format(flex.root.path, flex.owner.workspace_name)
29+
actual = "{}/external/{}".format(flex.root.path, flex.owner.workspace_name) # buildifier: disable=external-path
3030

3131
for key, value in flex_env.items():
3232
flex_env[key] = value.replace(flex_runfiles_dir, actual)

docs/agents/testing.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ OpenROAD has two types of tests: **integration tests** (Tcl) and **unit tests**
66

77
**Every new test MUST be registered in BOTH build systems. Missing either one is a build break.**
88

9-
| Build System | Registration File | Block/Macro |
10-
|-------------|-------------------|-------------|
11-
| **CMake** | `src/<module>/test/CMakeLists.txt` | `or_integration_tests(...)` |
12-
| **Bazel** | `src/<module>/test/BUILD` | `regression_test(...)` |
9+
| Build System | Registration File | Block/Macro |
10+
| ------------ | ---------------------------------- | --------------------------- |
11+
| **CMake** | `src/<module>/test/CMakeLists.txt` | `or_integration_tests(...)` |
12+
| **Bazel** | `src/<module>/test/BUILD` | `regression_test(...)` |
1313

1414
Forgetting the Bazel `BUILD` file is the most common mistake -- CMake-only registration
1515
silently passes local `make test` but the **test will be missing from Bazel CI**.
@@ -37,6 +37,12 @@ ctest -R "rsz\.buffer_ports1\.tcl"
3737

3838
Best practice reference: `src/rsz/test/repair_tie12_hier.tcl`
3939

40+
#### Issue Reproduction Tests
41+
42+
For issue reproductions, keep the test case minimal and focused on the failing tool behavior. When floorplanning or placement is not part of the bug, encode the small problem design directly in DEF and use `read_def` after loading the necessary LEF and Liberty files instead of running floorplanning or global placement. This keeps the test simpler and more stable across unrelated OpenROAD behavior changes. Use floorplanning or placement steps when those stages are part of the behavior under test.
43+
44+
#### Checklist
45+
4046
1. **Header comment**: First line must explain the test purpose
4147
```tcl
4248
# [Brief description of the test]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PASS: Bazel developer activities documentation coverage is adequate.

0 commit comments

Comments
 (0)