File tree Expand file tree Collapse file tree 1 file changed +24
-10
lines changed Expand file tree Collapse file tree 1 file changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -3954,23 +3954,37 @@ fn run_proper_binary_main_rs_as_foo() {
39543954}
39553955
39563956#[ test]
3957+ #[ cfg( not( windows) ) ] // We don't have /usr/bin/env on Windows.
39573958fn rustc_wrapper ( ) {
3958- // We don't have /usr/bin/env on Windows.
3959- if cfg ! ( windows) {
3960- return ;
3961- }
3962-
3963- let p = project ( )
3964- . file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
3965- . file ( "src/foo.rs" , & main_file ( r#""i am foo""# , & [ ] ) )
3966- . build ( ) ;
3967-
3959+ let p = project ( ) . file ( "src/lib.rs" , "" ) . build ( ) ;
39683960 p. cargo ( "build -v" )
39693961 . env ( "RUSTC_WRAPPER" , "/usr/bin/env" )
39703962 . with_stderr_contains ( "[RUNNING] `/usr/bin/env rustc --crate-name foo [..]" )
39713963 . run ( ) ;
39723964}
39733965
3966+ #[ test]
3967+ #[ cfg( not( windows) ) ]
3968+ fn rustc_wrapper_relative ( ) {
3969+ let p = project ( ) . file ( "src/lib.rs" , "" ) . build ( ) ;
3970+ p. cargo ( "build -v" )
3971+ . env ( "RUSTC_WRAPPER" , "./sccache" )
3972+ . with_status ( 101 )
3973+ . with_stderr_contains ( "[..]/foo/./sccache rustc[..]" )
3974+ . run ( ) ;
3975+ }
3976+
3977+ #[ test]
3978+ #[ cfg( not( windows) ) ]
3979+ fn rustc_wrapper_from_path ( ) {
3980+ let p = project ( ) . file ( "src/lib.rs" , "" ) . build ( ) ;
3981+ p. cargo ( "build -v" )
3982+ . env ( "RUSTC_WRAPPER" , "wannabe_sccache" )
3983+ . with_status ( 101 )
3984+ . with_stderr_contains ( "[..]`wannabe_sccache rustc [..]" )
3985+ . run ( ) ;
3986+ }
3987+
39743988#[ test]
39753989fn cdylib_not_lifted ( ) {
39763990 let p = project ( )
You can’t perform that action at this time.
0 commit comments