File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,5 @@ pub(crate) mod metrics;
1414pub ( crate ) mod render_tests;
1515pub ( crate ) mod shared_helpers;
1616pub ( crate ) mod tarball;
17+ #[ cfg( test) ]
18+ mod tests;
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ use std::io::Write;
1313use std:: process:: Command ;
1414use std:: str:: FromStr ;
1515
16- #[ cfg( test) ]
17- mod tests;
16+ // If we were to declare a tests submodule here, the shim binaries that include this
17+ // module via `#[path]` would fail to find it, which breaks `./x check bootstrap`.
18+ // So instead the unit tests for this module are in `super::tests::shared_helpers_tests`.
1819
1920/// Returns the environment variable which the dynamic library lookup path
2021/// resides in for this platform.
Original file line number Diff line number Diff line change 1+ mod shared_helpers_tests;
Original file line number Diff line number Diff line change 1- use super :: parse_value_from_args;
1+ //! The `shared_helpers` module can't have its own tests submodule, because
2+ //! that would cause problems for the shim binaries that include it via
3+ //! `#[path]`, so instead those unit tests live here.
4+ //!
5+ //! To prevent tidy from complaining about this file not being named `tests.rs`,
6+ //! it lives inside a submodule directory named `tests`.
7+
8+ use crate :: utils:: shared_helpers:: parse_value_from_args;
29
310#[ test]
411fn test_parse_value_from_args ( ) {
You can’t perform that action at this time.
0 commit comments