@@ -620,25 +620,25 @@ fn build_script_with_bin_artifacts() {
620620 assert_e2e ( ) . eq (
621621 & build_script_output,
622622 str![ [ r#"
623- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/baz[EXE]
624- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/staticlib/bar-[HASH].lib
625- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/cdylib/bar.dll
626- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin
627- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar[EXE]
628- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar[EXE]
623+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin/baz[EXE]
624+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /staticlib/bar-[HASH].lib
625+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /cdylib/bar.dll
626+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin
627+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin/bar[EXE]
628+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin/bar[EXE]
629629
630630"# ] ] ,
631631 ) ;
632632 } else {
633633 assert_e2e ( ) . eq (
634634 & build_script_output,
635635 str![ [ r#"
636- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/baz-[HASH] [EXE]
637- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/staticlib/libbar-[HASH].a
638- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/cdylib/[..]bar.[..]
639- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin
640- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar-[HASH] [EXE]
641- [ROOT]/foo/target/debug/deps/artifact/ bar- [HASH]/bin/bar-[HASH] [EXE]
636+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact/ bin/baz[EXE]
637+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /staticlib/libbar-[HASH].a
638+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /cdylib/[..]bar.[..]
639+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact /bin
640+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact/ bin/bar[EXE]
641+ [ROOT]/foo/target/debug/build/ bar/ [HASH]/artifact/ bin/bar[EXE]
642642
643643"# ] ] ,
644644 ) ;
@@ -810,17 +810,17 @@ fn build_script_with_selected_dashed_bin_artifact_and_lib_true() {
810810 assert_e2e ( ) . eq (
811811 & build_script_output,
812812 str![ [ r#"
813- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin
814- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin/baz_suffix[EXE]
813+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact /bin
814+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact /bin/baz_suffix[EXE]
815815
816816"# ] ] ,
817817 ) ;
818818 } else {
819819 assert_e2e ( ) . eq (
820820 & build_script_output,
821821 str![ [ r#"
822- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin
823- [ROOT]/foo/target/debug/deps/artifact/ bar-baz- [HASH]/bin/baz_suffix-[HASH] [EXE]
822+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact /bin
823+ [ROOT]/foo/target/debug/build/ bar-baz/ [HASH]/artifact/ bin/baz_suffix[EXE]
824824
825825"# ] ] ,
826826 ) ;
@@ -830,7 +830,7 @@ fn build_script_with_selected_dashed_bin_artifact_and_lib_true() {
830830 !p. bin( "bar" ) . is_file( ) ,
831831 "artifacts are located in their own directory, exclusively, and won't be lifted up"
832832 ) ;
833- assert_artifact_executable_output ( & p, "debug" , "bar" , "baz_suffix" ) ;
833+ assert_artifact_executable_output ( & p, "debug" , "bar-baz " , "baz_suffix" ) ;
834834}
835835
836836#[ cargo_test]
@@ -900,7 +900,7 @@ fn lib_with_selected_dashed_bin_artifact_and_lib_true() {
900900 !p. bin( "bar" ) . is_file( ) ,
901901 "artifacts are located in their own directory, exclusively, and won't be lifted up"
902902 ) ;
903- assert_artifact_executable_output ( & p, "debug" , "bar" , "baz_suffix" ) ;
903+ assert_artifact_executable_output ( & p, "debug" , "bar-baz " , "baz_suffix" ) ;
904904}
905905
906906#[ cargo_test]
@@ -943,7 +943,7 @@ fn allow_artifact_and_no_artifact_dep_to_same_package_within_different_dep_categ
943943[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
944944[COMPILING] foo v0.0.0 ([ROOT]/foo)
945945[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
946- [RUNNING] unittests src/lib.rs (target/debug/deps /foo-[HASH][EXE])
946+ [RUNNING] unittests src/lib.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
947947[DOCTEST] foo
948948
949949"# ] ] )
@@ -1292,7 +1292,7 @@ fn cross_doctests_works_with_artifacts() {
12921292[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
12931293[COMPILING] foo v0.0.1 ([ROOT]/foo)
12941294[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1295- [RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/deps /foo-[HASH][EXE])
1295+ [RUNNING] unittests src/lib.rs (target/[HOST_TARGET]/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
12961296[DOCTEST] foo
12971297
12981298"# ] ] )
@@ -1316,7 +1316,7 @@ fn cross_doctests_works_with_artifacts() {
13161316[RUNNING] `rustc --crate-name foo [..]
13171317[RUNNING] `rustc --crate-name foo [..]
13181318[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
1319- [RUNNING] `[ROOT]/foo/target/[ALT_TARGET]/debug/deps /foo-[HASH][EXE]`
1319+ [RUNNING] `[ROOT]/foo/target/[ALT_TARGET]/debug/build/foo/[HASH]/out /foo-[HASH][EXE]`
13201320[DOCTEST] foo
13211321[RUNNING] `rustdoc [..]--test src/lib.rs --test-run-directory [ROOT]/foo --target [ALT_TARGET] [..]
13221322
@@ -1422,7 +1422,7 @@ fn profile_override_basic() {
14221422[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] -C opt-level=1 [..]`
14231423[RUNNING] `rustc --crate-name bar --edition=2015 bar/src/lib.rs [..] -C opt-level=3 [..]`
14241424[RUNNING] `rustc --crate-name foo [..] -C opt-level=3 [..]`
1425- [RUNNING] `[ROOT]/foo/target/debug/build/foo- [HASH]/build-script-build `
1425+ [RUNNING] `[ROOT]/foo/target/debug/build/foo/ [HASH]/out/build_script_build `
14261426[FINISHED] `dev` profile [optimized + debuginfo] target(s) in [ELAPSED]s
14271427[COMPILING] foo v0.0.1 ([ROOT]/foo)
14281428
@@ -2207,8 +2207,8 @@ fn env_vars_and_build_products_for_various_build_targets() {
22072207[COMPILING] bar v0.5.0 ([ROOT]/foo/bar)
22082208[COMPILING] foo v0.0.0 ([ROOT]/foo)
22092209[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
2210- [RUNNING] unittests src/lib.rs (target/debug/deps /foo-[HASH][EXE])
2211- [RUNNING] tests/main.rs (target/debug/deps /main-[HASH][EXE])
2210+ [RUNNING] unittests src/lib.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
2211+ [RUNNING] tests/main.rs (target/debug/build/foo/[HASH]/out /main-[HASH][EXE])
22122212[DOCTEST] foo
22132213
22142214"# ] ] )
@@ -2416,7 +2416,11 @@ fn doc_lib_true() {
24162416
24172417 // Verify that it emits rmeta for the bin and lib dependency.
24182418 assert_eq ! ( p. glob( "target/debug/artifact/*.rlib" ) . count( ) , 0 ) ;
2419- assert_eq ! ( p. glob( "target/debug/deps/libbar-*.rmeta" ) . count( ) , 2 ) ;
2419+ assert_eq ! (
2420+ p. glob( "target/debug/build/bar/*/out/libbar-*.rmeta" )
2421+ . count( ) ,
2422+ 2
2423+ ) ;
24202424
24212425 p. cargo ( "doc -Z bindeps" )
24222426 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
@@ -2508,7 +2512,7 @@ fn assert_artifact_executable_output(
25082512 if cfg ! ( target_env = "msvc" ) {
25092513 assert_eq ! (
25102514 p. glob( format!(
2511- "target/{}/deps/artifact/{}-* /bin/{}{}" ,
2515+ "target/{}/build/{}/*/artifact /bin/{}{}" ,
25122516 target_name,
25132517 dep_name,
25142518 bin_name,
@@ -2521,7 +2525,7 @@ fn assert_artifact_executable_output(
25212525 } else {
25222526 assert_eq ! (
25232527 p. glob( format!(
2524- "target/{}/deps/artifact/{}-*/ bin/{}-* {}" ,
2528+ "target/{}/build/{}/*/artifact/ bin/{}{}" ,
25252529 target_name,
25262530 dep_name,
25272531 bin_name,
@@ -2538,7 +2542,7 @@ fn assert_artifact_executable_output(
25382542
25392543fn build_script_output_string ( p : & Project , package_name : & str ) -> String {
25402544 let paths = p
2541- . glob ( format ! ( "target/debug/build/{}-*/output " , package_name) )
2545+ . glob ( format ! ( "target/debug/build/{}/*/run/stdout " , package_name) )
25422546 . collect :: < Result < Vec < _ > , _ > > ( )
25432547 . unwrap ( ) ;
25442548 assert_eq ! ( paths. len( ) , 1 ) ;
@@ -2822,7 +2826,7 @@ fn with_assumed_host_target_and_optional_build_dep() {
28222826[COMPILING] d1 v0.0.1 ([ROOT]/foo/d1)
28232827[RUNNING] `rustc --crate-name build_script_build --edition=2021 [..]--crate-type bin[..]
28242828[RUNNING] `rustc --crate-name d1 --edition=2021 [..]--crate-type bin[..]
2825- [RUNNING] `[ROOT]/foo/target/debug/build/foo- [HASH]/build-script-build `
2829+ [RUNNING] `[ROOT]/foo/target/debug/build/foo/ [HASH]/out/build_script_build `
28262830[RUNNING] `rustc --crate-name foo --edition=2021 [..]--cfg[..]d1[..]
28272831[FINISHED] `dev` profile [..]
28282832[COMPILING] foo v0.0.1 ([ROOT]/foo)
@@ -3489,7 +3493,7 @@ fn artifact_dep_target_does_not_propagate_to_deps_of_build_script() {
34893493[COMPILING] artifact v0.0.1 ([ROOT]/foo/artifact)
34903494[COMPILING] foo v0.0.1 ([ROOT]/foo)
34913495[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3492- [RUNNING] unittests src/main.rs (target/debug/deps /foo-[HASH][EXE])
3496+ [RUNNING] unittests src/main.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
34933497
34943498"# ] ] )
34953499 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
@@ -3581,7 +3585,7 @@ fn artifact_dep_target_does_not_propagate_to_proc_macro() {
35813585[COMPILING] artifact v0.0.1 ([ROOT]/foo/artifact)
35823586[COMPILING] foo v0.0.1 ([ROOT]/foo)
35833587[FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
3584- [RUNNING] unittests src/main.rs (target/debug/deps /foo-[HASH][EXE])
3588+ [RUNNING] unittests src/main.rs (target/debug/build/foo/[HASH]/out /foo-[HASH][EXE])
35853589
35863590"# ] ] )
35873591 . masquerade_as_nightly_cargo ( & [ "bindeps" ] )
0 commit comments