@@ -4132,10 +4132,8 @@ fn building_a_dependent_crate_witout_bin_should_fail() {
41324132}
41334133
41344134#[ test]
4135+ #[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ]
41354136fn uplift_dsym_of_bin_on_mac ( ) {
4136- if !cfg ! ( any( target_os = "macos" , target_os = "ios" ) ) {
4137- return ;
4138- }
41394137 let p = project ( )
41404138 . file ( "src/main.rs" , "fn main() { panic!(); }" )
41414139 . file ( "src/bin/b.rs" , "fn main() { panic!(); }" )
@@ -4144,23 +4142,17 @@ fn uplift_dsym_of_bin_on_mac() {
41444142 . build ( ) ;
41454143
41464144 p. cargo ( "build --bins --examples --tests" ) . run ( ) ;
4147- assert ! ( p. bin( "foo.dSYM" ) . is_dir( ) ) ;
4148- assert ! ( p. bin( "b.dSYM" ) . is_dir( ) ) ;
4149- assert ! ( p
4150- . bin( "b.dSYM" )
4151- . symlink_metadata( )
4152- . expect( "read metadata from b.dSYM" )
4153- . file_type( )
4154- . is_symlink( ) ) ;
4155- assert ! ( !p. bin( "c.dSYM" ) . is_dir( ) ) ;
4156- assert ! ( !p. bin( "d.dSYM" ) . is_dir( ) ) ;
4145+ assert ! ( p. target_debug_dir( ) . join( "foo.dSYM" ) . is_dir( ) ) ;
4146+ assert ! ( p. target_debug_dir( ) . join( "b.dSYM" ) . is_dir( ) ) ;
4147+ assert ! ( p. target_debug_dir( ) . join( "b.dSYM" ) . is_symlink( ) ) ;
4148+ assert ! ( p. target_debug_dir( ) . join( "examples/c.dSYM" ) . is_symlink( ) ) ;
4149+ assert ! ( !p. target_debug_dir( ) . join( "c.dSYM" ) . exists( ) ) ;
4150+ assert ! ( !p. target_debug_dir( ) . join( "d.dSYM" ) . exists( ) ) ;
41574151}
41584152
41594153#[ test]
4154+ #[ cfg( all( target_os = "windows" , target_env = "msvc" ) ) ]
41604155fn uplift_pdb_of_bin_on_windows ( ) {
4161- if !cfg ! ( all( target_os = "windows" , target_env = "msvc" ) ) {
4162- return ;
4163- }
41644156 let p = project ( )
41654157 . file ( "src/main.rs" , "fn main() { panic!(); }" )
41664158 . file ( "src/bin/b.rs" , "fn main() { panic!(); }" )
@@ -4171,8 +4163,10 @@ fn uplift_pdb_of_bin_on_windows() {
41714163 p. cargo ( "build --bins --examples --tests" ) . run ( ) ;
41724164 assert ! ( p. target_debug_dir( ) . join( "foo.pdb" ) . is_file( ) ) ;
41734165 assert ! ( p. target_debug_dir( ) . join( "b.pdb" ) . is_file( ) ) ;
4174- assert ! ( !p. target_debug_dir( ) . join( "c.pdb" ) . is_file( ) ) ;
4175- assert ! ( !p. target_debug_dir( ) . join( "d.pdb" ) . is_file( ) ) ;
4166+ assert ! ( !p. target_debug_dir( ) . join( "examples/c.pdb" ) . exists( ) ) ;
4167+ assert_eq ! ( p. glob( "target/debug/examples/c-*.pdb" ) . count( ) , 1 ) ;
4168+ assert ! ( !p. target_debug_dir( ) . join( "c.pdb" ) . exists( ) ) ;
4169+ assert ! ( !p. target_debug_dir( ) . join( "d.pdb" ) . exists( ) ) ;
41764170}
41774171
41784172// Ensure that `cargo build` chooses the correct profile for building
0 commit comments