rules_rust/test/rust_test_suite_shared
Ivan Carvalho b3fe74cc97
Add support for shared test-only modules (#2734)
Currently, `rust_test_suite` is not capable of supporting integration
tests with shared modules. A very basic example is:
```
[crate]/
    src/
        lib.rs
    tests/
        integration_test_a.rs
        integration_test_b.rs
        util/
            mod.rs
```
With `integration_test_a.rs` and `integration_test_b.rs` importing code
from `util`.

This PR adds a `shared_srcs` argument to `rust_test_suite`. That way, we
can finally compile and run those tests with:
```python
rust_test_suite(
    name = "integrated_tests_suite",
    srcs = glob(["tests/**"]),
    shared_srcs = ["tests/util/mod.rs"],
    deps = [":example_dep"],
)
```
2024-07-10 14:02:35 +00:00
..
src Add support for shared test-only modules (#2734) 2024-07-10 14:02:35 +00:00
tests Add support for shared test-only modules (#2734) 2024-07-10 14:02:35 +00:00
BUILD.bazel Add support for shared test-only modules (#2734) 2024-07-10 14:02:35 +00:00