Skip to content

Add named executable tools to bashtest - #55

Merged
helly25 merged 9 commits into
mainfrom
feat/test-tools
Oct 17, 2026
Merged

helly25 merged 9 commits into
mainfrom
feat/test-tools

Conversation

@helly25

@helly25 helly25 commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Add tools = {"GENERATOR": "//tools:generator"} to build helper executables for the platform running a test and export their resolved paths automatically. Scripts invoke "${GENERATOR}"; helper runfiles are included, including Windows executables and manifest-only layouts.

AG;DR

  • Targets main; dependency Support Windows Bash and manifest-only runfiles #54 has merged. Merge this PR before Provision Bash and Unix utilities automatically on Windows #56. The synchronization merge preserves the previously tested files exactly: Support Windows Bash and manifest-only runfiles #54 was squash-merged with an identical tree.
  • A Starlark test wrapper transitions tools with config.exec("test"), preserving the test execution group's platform constraints. A non-test sh_binary target supplies the rules_shell launcher; a generated manifest maps environment names to executable runfiles. With tools there is exactly one test target, with no forced manual tag or private visibility on the launcher.
  • Preserve target-configured data, helper default/data runfiles, inherited test environment, and coverage metadata. Multiple environment names can reference one executable. The test rule owns environment expansion, preserving runfiles-relative location paths on Bazel 7 and 9.
  • Reject non-executable tools, malformed/reserved variable names, environment collisions, and targets declared directly in both data and tools. Avoid mixing target- and execution-configured instances of the same generated runfile in transitive dependencies.
  • Tests exercise two distinct generated executables in one script, runtime dependencies, aliases, quoted arguments, renamed external repositories, paths containing spaces, manifest-only bazel test and bazel run, and invalid declarations. The external consumer selects different ordinary and test execution platforms on Bazel 9; Bazel 7 uses its supported exec_compatible_with attribute.
  • tool_fixture.bzl is private test infrastructure, with private load visibility; it is not part of the public API.
  • Validation of head 1ae692c: local bazel test //... (8 passing) and repository-wide pre-commit pass. All fresh PR CI checks against main passed, including Linux, macOS, Windows, release-site checks, pre-commit, and the required done gate. Post-merge main CI for Support Windows Bash and manifest-only runfiles #54 also passed.

@helly25
helly25 added this pull request to stack #57 October 17, 2026 16:50
Base automatically changed from feat/windows-runfiles to main October 17, 2026 16:51
@helly25
helly25 removed this pull request from stack #57 October 17, 2026 16:53
@helly25
helly25 merged commit 215ec2a into main Oct 17, 2026
6 checks passed
@helly25
helly25 deleted the feat/test-tools branch October 17, 2026 16:57
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.

1 participant