Skip to content

feat: re-export rust_test_suite - #193

Open
pdeva wants to merge 1 commit into
hermeticbuild:mainfrom
pdeva:pdeva/reexport-rust-test-suite
Open

feat: re-export rust_test_suite#193
pdeva wants to merge 1 commit into
hermeticbuild:mainfrom
pdeva:pdeva/reexport-rust-test-suite

Conversation

@pdeva

@pdeva pdeva commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • re-export upstream rust_test_suite from the rules_rs Rust test façade
  • add an integration smoke test with two test roots and a shared source

Why

rules_rust already provides rust_test_suite for Cargo-style integration
tests, but rules_rs only exposed rust_test. Consumers therefore had to
either load from the generated @rules_rust repository directly or maintain
their own equivalent macro.

Exposing the suite alongside rust_test keeps consumers on the @rules_rs
public API.

Validation

  • bazelisk build //rs:rust_test
  • cd test && bazelisk test //:rust_test_suite_smoke
  • buildifier check on the changed Starlark files
  • rustfmt --check on the new Rust test sources
  • git diff --check

@dzbarsky

Copy link
Copy Markdown
Member

@pdeva Thanks for sending this up! I've been thinking we should actually expose a simplified/cleaned-up version of this rust_crate macro - the idea being that we should be generating not only the unit tests like rust_test_suite, but also the per-binary test targets, like Cargo does. As part of that I can decompose to some helper macros so the piece can be used independently, that can cover rust_unit_test_suite (note unit in the name) as you are doing here. WDYT of that approach?

@pdeva

pdeva commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

@dzbarsky i like your approach 👍

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