bazelbuild / bazelbuild/rules_rust

rust_test_suite does not pull in common code in common module

Open
#2,266 1 comment 0 reactions 0 assignees View on GitHub
needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

In attempting to get a simple `rust_test_suite` target running, I think I am seeing that it does not support the design pattern for including common functionality as detailed here in the Rust Book [submodules-in-integration-tests](https://doc.rust-lang.org/book/ch11-03-test-organization.html#submodules-in-integration-tests).

Specifically, when placing common code into `common/mod.rs` and referencing the common functionality in the root level integration tests, I am getting the following error message:

```
error[E0583]: file not found for module `common`
|
3 | mod common;
| ^^^^^^^^^^^
|
```
I am now attempting to see if the `kwargs` parameter for `rust_test_suite` can help here and will report back. I will also do a sanity check on multiple `rust_test` setups to accomplish same.

Does anyone have any additional insights to this issue?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.