mirror of https://github.com/bazelbuild/rules_rust
b3fe74cc97
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"], ) ``` |
||
---|---|---|
.. | ||
src | ||
tests | ||
BUILD.bazel |