Files
OpenROAD/test/install/README.md
Øyvind Harboe dc04ecd404 bazel: fix installed binary Tcl init failure
install.sh deleted openroad.runfiles/_main which contains the Tcl
resource files (init.tcl, tclreadline, etc.) needed by the Bazel-built
binary.  Remove that rm so the runfiles tree stays intact after install.

Add an install smoke test that extracts the packaging tarball and
verifies the binary can evaluate a Tcl expression — catches regressions
like this automatically.

Validate: bazelisk test //test/install/...

Fixes #10115

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-04-12 13:39:48 +02:00

891 B

Install smoke test

Verifies that the binary produced by //packaging:tarfile starts correctly after extraction (Tcl initialisation, runfiles resolution, etc.).

Running

bazelisk test //test/install/...

What it checks

  1. Extracts the packaging tarball into a temporary directory (same layout that bazelisk run //packaging:install produces).
  2. Launches the binary with a trivial Tcl script (puts "install_test_ok").
  3. Asserts the expected output appears, proving Tcl initialised and the interpreter is functional.

Background

The installed binary relies on Bazel runfiles for Tcl library files (init.tcl, tclreadline, etc.). These live under openroad.runfiles/_main/bazel/tcl_resources_dir/. If the runfiles tree is damaged during packaging or installation the binary fails with application-specific initialization failed: (GitHub issue #10115).