@@ -1149,11 +1149,20 @@ fn compile_test(config: &Config, props: &TestProps,
1149
1149
}
1150
1150
1151
1151
fn document ( config : & Config , props : & TestProps ,
1152
- testfile : & Path ) -> ( ProcRes , PathBuf ) {
1152
+ testfile : & Path , out_dir : & Path ) -> ProcRes {
1153
+ if props. build_aux_docs {
1154
+ for rel_ab in & props. aux_builds {
1155
+ let abs_ab = config. aux_base . join ( rel_ab) ;
1156
+ let aux_props = header:: load_props ( & abs_ab) ;
1157
+
1158
+ let auxres = document ( config, & aux_props, & abs_ab, out_dir) ;
1159
+ if !auxres. status . success ( ) {
1160
+ return auxres;
1161
+ }
1162
+ }
1163
+ }
1164
+
1153
1165
let aux_dir = aux_output_dir_name ( config, testfile) ;
1154
- let out_dir = output_base_name ( config, testfile) ;
1155
- let _ = fs:: remove_dir_all ( & out_dir) ;
1156
- ensure_dir ( & out_dir) ;
1157
1166
let mut args = vec ! [ "-L" . to_owned( ) ,
1158
1167
aux_dir. to_str( ) . unwrap( ) . to_owned( ) ,
1159
1168
"-o" . to_owned( ) ,
@@ -1164,7 +1173,7 @@ fn document(config: &Config, props: &TestProps,
1164
1173
prog : config. rustdoc_path . to_str ( ) . unwrap ( ) . to_owned ( ) ,
1165
1174
args : args,
1166
1175
} ;
1167
- ( compose_and_run_compiler ( config, props, testfile, args, None ) , out_dir )
1176
+ compose_and_run_compiler ( config, props, testfile, args, None )
1168
1177
}
1169
1178
1170
1179
fn exec_compiled_test ( config : & Config , props : & TestProps ,
@@ -1723,7 +1732,11 @@ fn charset() -> &'static str {
1723
1732
}
1724
1733
1725
1734
fn run_rustdoc_test ( config : & Config , props : & TestProps , testfile : & Path ) {
1726
- let ( proc_res, out_dir) = document ( config, props, testfile) ;
1735
+ let out_dir = output_base_name ( config, testfile) ;
1736
+ let _ = fs:: remove_dir_all ( & out_dir) ;
1737
+ ensure_dir ( & out_dir) ;
1738
+
1739
+ let proc_res = document ( config, props, testfile, & out_dir) ;
1727
1740
if !proc_res. status . success ( ) {
1728
1741
fatal_proc_rec ( "rustdoc failed!" , & proc_res) ;
1729
1742
}
0 commit comments