@@ -1595,20 +1595,10 @@ impl<'test> TestCx<'test> {
15951595 }
15961596
15971597 /// aux: whether we are building the aux docs or main docs
1598- fn document ( & self , out_dir : & Path , info_json : Option < & Path > ) -> ProcRes {
1599- /// Path to give to --include-info-json and --write-info-json
1600- fn info_path ( cx : & TestCx < ' _ > , rel_ab : & str ) -> PathBuf {
1601- cx. output_base_dir ( ) . parent ( ) . unwrap ( ) . parent ( ) . unwrap ( )
1602- . join ( "doc.parts" )
1603- . join ( rel_ab. trim_end_matches ( ".rs" ) . replace ( "-" , "_" ) )
1604- . join ( "crate-info.json" )
1605- }
1606-
1607- let mut include_flags = Vec :: default ( ) ;
1608-
1598+ fn document ( & self , out_dir : & Path ) -> ProcRes {
16091599 if self . props . build_aux_docs {
16101600 for rel_ab in & self . props . aux_builds {
1611- let aux_testpaths = self . compute_aux_test_paths ( & self . testpaths , rel_ab) ;
1601+ let aux_testpaths = self . compute_aux_test_paths ( dbg ! ( & self . testpaths) , dbg ! ( rel_ab) ) ;
16121602 let aux_props =
16131603 self . props . from_aux_file ( & aux_testpaths. file , self . revision , self . config ) ;
16141604 let aux_cx = TestCx {
@@ -1617,11 +1607,14 @@ impl<'test> TestCx<'test> {
16171607 testpaths : & aux_testpaths,
16181608 revision : self . revision ,
16191609 } ;
1620- let info_json = info_path ( & aux_cx, rel_ab) ;
1621- include_flags. push ( format ! ( "--include-info-json={}" , info_json. display( ) ) ) ;
16221610 // Create the directory for the stdout/stderr files.
16231611 create_dir_all ( aux_cx. output_base_dir ( ) ) . unwrap ( ) ;
1624- let auxres = aux_cx. document ( out_dir, Some ( & info_json) ) ;
1612+ let out_dir = if aux_props. unique_doc_aux_dir {
1613+ out_dir. join ( "docs" ) . join ( rel_ab. trim_end_matches ( ".rs" ) ) . join ( "doc" )
1614+ } else {
1615+ out_dir. to_owned ( )
1616+ } ;
1617+ let auxres = aux_cx. document ( & out_dir) ;
16251618 if !auxres. status . success ( ) {
16261619 return auxres;
16271620 }
@@ -1645,24 +1638,8 @@ impl<'test> TestCx<'test> {
16451638 . arg ( & self . testpaths . file )
16461639 . arg ( "-A" )
16471640 . arg ( "internal_features" )
1648- . args ( & self . props . compile_flags ) ;
1649-
1650- if self . config . aux_write_doc_cci {
1651- match info_json {
1652- Some ( info_json) => {
1653- rustdoc
1654- . arg ( "-Zunstable-options" )
1655- . arg ( "--merge=none" )
1656- . arg ( format ! ( "--write-info-json={}" , info_json. display( ) ) ) ;
1657- }
1658- None => {
1659- rustdoc
1660- . arg ( "-Zunstable-options" )
1661- . arg ( "--merge=write-only" )
1662- . args ( & include_flags) ;
1663- }
1664- }
1665- }
1641+ . args ( & self . props . compile_flags )
1642+ . args ( & self . props . doc_flags ) ;
16661643
16671644 if self . config . mode == RustdocJson {
16681645 rustdoc. arg ( "--output-format" ) . arg ( "json" ) . arg ( "-Zunstable-options" ) ;
@@ -1788,6 +1765,7 @@ impl<'test> TestCx<'test> {
17881765 fn compute_aux_test_paths ( & self , of : & TestPaths , rel_ab : & str ) -> TestPaths {
17891766 let test_ab =
17901767 of. file . parent ( ) . expect ( "test file path has no parent" ) . join ( "auxiliary" ) . join ( rel_ab) ;
1768+ dbg ! ( & of, rel_ab, & test_ab) ;
17911769 if !test_ab. exists ( ) {
17921770 self . fatal ( & format ! ( "aux-build `{}` source not found" , test_ab. display( ) ) )
17931771 }
@@ -1892,7 +1870,7 @@ impl<'test> TestCx<'test> {
18921870 aux_dir : & Path ,
18931871 is_bin : bool ,
18941872 ) -> AuxType {
1895- let aux_testpaths = self . compute_aux_test_paths ( of , source_path) ;
1873+ let aux_testpaths = self . compute_aux_test_paths ( dbg ! ( of ) , dbg ! ( source_path) ) ;
18961874 let aux_props = self . props . from_aux_file ( & aux_testpaths. file , self . revision , self . config ) ;
18971875 let mut aux_dir = aux_dir. to_path_buf ( ) ;
18981876 if is_bin {
@@ -2706,7 +2684,7 @@ impl<'test> TestCx<'test> {
27062684 let out_dir = self . output_base_dir ( ) ;
27072685 remove_and_create_dir_all ( & out_dir) ;
27082686
2709- let proc_res = self . document ( & out_dir, None ) ;
2687+ let proc_res = self . document ( & out_dir) ;
27102688 if !proc_res. status . success ( ) {
27112689 self . fatal_proc_rec ( "rustdoc failed!" , & proc_res) ;
27122690 }
@@ -2765,7 +2743,7 @@ impl<'test> TestCx<'test> {
27652743 let aux_dir = new_rustdoc. aux_output_dir ( ) ;
27662744 new_rustdoc. build_all_auxiliary ( & new_rustdoc. testpaths , & aux_dir, & mut rustc) ;
27672745
2768- let proc_res = new_rustdoc. document ( & compare_dir, None ) ;
2746+ let proc_res = new_rustdoc. document ( & compare_dir) ;
27692747 if !proc_res. status . success ( ) {
27702748 eprintln ! ( "failed to run nightly rustdoc" ) ;
27712749 return ;
@@ -2888,7 +2866,7 @@ impl<'test> TestCx<'test> {
28882866 let out_dir = self . output_base_dir ( ) ;
28892867 remove_and_create_dir_all ( & out_dir) ;
28902868
2891- let proc_res = self . document ( & out_dir, None ) ;
2869+ let proc_res = self . document ( & out_dir) ;
28922870 if !proc_res. status . success ( ) {
28932871 self . fatal_proc_rec ( "rustdoc failed!" , & proc_res) ;
28942872 }
@@ -3818,7 +3796,7 @@ impl<'test> TestCx<'test> {
38183796 if let Some ( nodejs) = & self . config . nodejs {
38193797 let out_dir = self . output_base_dir ( ) ;
38203798
3821- self . document ( & out_dir, None ) ;
3799+ self . document ( & out_dir) ;
38223800
38233801 let root = self . config . find_rust_src_root ( ) . unwrap ( ) ;
38243802 let file_stem =
0 commit comments