File tree 4 files changed +14
-3
lines changed
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;
14
14
pub ( crate ) mod render_tests;
15
15
pub ( crate ) mod shared_helpers;
16
16
pub ( 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;
13
13
use std:: process:: Command ;
14
14
use std:: str:: FromStr ;
15
15
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`.
18
19
19
20
/// Returns the environment variable which the dynamic library lookup path
20
21
/// 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;
2
9
3
10
#[ test]
4
11
fn test_parse_value_from_args ( ) {
You can’t perform that action at this time.
0 commit comments