File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1719,6 +1719,28 @@ fn check_build_should_not_lock_artifact_dir() {
17191719 assert ! ( !p. root( ) . join( "target/debug/.cargo-lock" ) . exists( ) ) ;
17201720}
17211721
1722+ #[ cargo_test]
1723+ fn check_build_should_not_lock_artifact_dir_when_build_dir_is_not_same_dir ( ) {
1724+ let p = project ( )
1725+ . file ( "src/main.rs" , r#"fn main() { println!("Hello, World!") }"# )
1726+ . file (
1727+ ".cargo/config.toml" ,
1728+ r#"
1729+ [build]
1730+ target-dir = "target-dir"
1731+ build-dir = "build-dir"
1732+ "# ,
1733+ )
1734+ . build ( ) ;
1735+
1736+ p. cargo ( "check" ) . enable_mac_dsym ( ) . run ( ) ;
1737+
1738+ // Verify we did NOT take the build-dir lock
1739+ assert ! ( !p. root( ) . join( "target-dir/debug/.cargo-lock" ) . exists( ) ) ;
1740+ // Verify we did take the build-dir lock
1741+ assert ! ( p. root( ) . join( "build-dir/debug/.cargo-lock" ) . exists( ) ) ;
1742+ }
1743+
17221744// Regression test for #16305
17231745#[ cargo_test]
17241746fn check_build_should_not_uplift_proc_macro_dylib_deps ( ) {
You can’t perform that action at this time.
0 commit comments