File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change @@ -200,11 +200,12 @@ fn run_doc_tests(
200200            p. arg ( unit. target . src_path ( ) . path ( ) . unwrap ( ) ) ; 
201201        } 
202202
203+         if  let  CompileKind :: Target ( target)  = unit. kind  { 
204+             // use `rustc_target()` to properly handle JSON target paths 
205+             p. arg ( "--target" ) . arg ( target. rustc_target ( ) ) ; 
206+         } 
207+ 
203208        if  doctest_xcompile { 
204-             if  let  CompileKind :: Target ( target)  = unit. kind  { 
205-                 // use `rustc_target()` to properly handle JSON target paths 
206-                 p. arg ( "--target" ) . arg ( target. rustc_target ( ) ) ; 
207-             } 
208209            p. arg ( "-Zunstable-options" ) ; 
209210            p. arg ( "--enable-per-target-ignores" ) ; 
210211            if  let  Some ( ( runtool,  runtool_args) )  = compilation. target_runner ( unit. kind )  { 
Original file line number Diff line number Diff line change @@ -592,17 +592,33 @@ fn no_cross_doctests() {
592592
593593    println ! ( "b" ) ; 
594594    let  target = rustc_host ( ) ; 
595-     p. cargo ( "test --target" ) 
595+     p. cargo ( "test -v - -target" ) 
596596        . arg ( & target) 
597597        . with_stderr ( & format ! ( 
598598            "\  
599599
600+ [RUNNING] `rustc --crate-name foo [..] 
601+ [RUNNING] `rustc --crate-name foo [..]--test[..] 
600602[FINISHED] test [unoptimized + debuginfo] target(s) in [..] 
601- [RUNNING] [..] ( target/{triple }/debug/deps/foo-[..][EXE])  
603+ [RUNNING] `[CWD]/ target/{target }/debug/deps/foo-[..][EXE]`  
602604[DOCTEST] foo 
605+ [RUNNING] `rustdoc [..]--target {target}[..]` 
603606" , 
604-             triple = target
605607        ) ) 
608+         . with_stdout ( 
609+             " 
610+ running 0 tests 
611+ 
612+ test result: ok. 0 passed[..] 
613+ 
614+ 
615+ running 1 test 
616+ test src/lib.rs - (line 2) ... ok 
617+ 
618+ test result: ok. 1 passed[..] 
619+ 
620+ " , 
621+         ) 
606622        . run ( ) ; 
607623
608624    println ! ( "c" ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments