-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow passing default_roots to rust_test to disambiguate
Summary: In the general case, it's ambiguous whether a usage of `rust_test()` is to declare a test target for a *library* or for a *binary*. This makes it tricky to determine the crate root as we must consider both `lib.rs` and `main.rs`. However, for our use-case, we tend to add unit test targets as part of a `rust_library` or `rust_binary` macro, where we have the information to disambiguate. This change proposes exposing `default_roots` on `rust_test` so that we can pass the correct root candidate for our automatic test targets. See also https://fb.workplace.com/groups/rustonmobile/posts/3858526464393667 Reviewed By: dtolnay Differential Revision: D62585839 fbshipit-source-id: d00b890d7b051e92ce4d16e388fe520ef05a8248
- Loading branch information
1 parent
3e31dd6
commit 5dc95b4
Showing
3 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters