Commit Graph

8 Commits

Author SHA1 Message Date
Henner Zeller
c93775e377 Remove MODULE.bazel.lock for downstream testing.
This file is not relevant for testing if a downstream
compile would work, but a maintenance burden.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-04-02 23:30:24 +02:00
Henner Zeller
479921da58 Make sure downstream is compiling with c++20
... openroad is not compatible with older versions and
the default compilers resort to is c++17.

Last change that finally fixes #9937

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-25 23:22:06 +01:00
Øyvind Harboe
458efdb6e8 test: replace slow downstream workspace tests with instant py_tests
Instead of spinning up a separate Bazel workspace (minutes), inspect
BUILD.bazel and MODULE.bazel directly with py_test (0.1s each).

7 individual tests: visibility checks for openroad, openroad_py,
openroad_lib, and dev_dependency checks for rules_shell, rules_pkg,
rules_verilator, verilator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-24 00:55:09 +01:00
Øyvind Harboe
465f2e9a55 test: split downstream visibility test into individual sh_tests
Replace monolithic visibility_test.sh (7 sequential bazelisk invocations)
with 7 individual sh_test targets that can run in parallel and be
debugged independently.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-24 00:44:27 +01:00
Øyvind Harboe
3ca22372a6 fix: make aspect_rules_js and rules_nodejs non-dev dependencies
src/web uses @npm for bundled assets, so aspect_rules_js, rules_nodejs,
and their extensions (node, npm) must be non-dev for downstream consumers.
Add .bazelrc to test/downstream for --experimental_isolated_extension_usages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-24 00:39:45 +01:00
Øyvind Harboe
1c8778b5c8 Fix downstream visibility test for Bazel test environment
Two issues prevented the test from working under bazelisk test:
- dirname "$0" resolved to the runfiles tree, not the source tree;
  use readlink -f to follow the symlink to the real script location
- HOME is not set in Bazel test environments; bazelisk needs it to
  locate its cache directory

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 17:46:24 +01:00
Øyvind Harboe
7e13b33816 build: run buildifier on modified Bazel files
Signed-off-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-19 12:21:33 +01:00
Øyvind Harboe
619a1827ae test: add downstream visibility and dev_dependency test
Add a mock downstream project (test/downstream/) that verifies:
- Public targets (//:openroad, //:openroad_py) are visible
- Internal targets (//:openroad_lib, //:_openroadpy.so) are restricted
- Dev dependencies (rules_shell, rules_pkg, rules_verilator) are not
  leaked to downstream consumers

The test uses local_path_override to consume OpenROAD as a dependency,
matching how real downstream projects would use it.

Wired as //test:downstream_visibility_test in the main build.

Signed-off-by: Claude Code <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-19 12:13:45 +01:00