@@ -167,16 +167,16 @@ fn scrape_test_config(krate: &::rustc::hir::Crate) -> TestOptions {
167167 opts
168168}
169169
170- fn runtest ( test : & str , cratename : & str , cfgs : Vec < String > , libs : SearchPaths ,
171- externs : Externs ,
172- should_panic : bool , no_run : bool , as_test_harness : bool ,
173- compile_fail : bool , mut error_codes : Vec < String > , opts : & TestOptions ,
174- maybe_sysroot : Option < PathBuf > ) {
170+ fn run_test ( test : & str , cratename : & str , filename : & str , cfgs : Vec < String > , libs : SearchPaths ,
171+ externs : Externs ,
172+ should_panic : bool , no_run : bool , as_test_harness : bool ,
173+ compile_fail : bool , mut error_codes : Vec < String > , opts : & TestOptions ,
174+ maybe_sysroot : Option < PathBuf > ) {
175175 // the test harness wants its own `main` & top level functions, so
176176 // never wrap the test in `fn main() { ... }`
177- let test = maketest ( test, Some ( cratename) , as_test_harness, opts) ;
177+ let test = make_test ( test, Some ( cratename) , as_test_harness, opts) ;
178178 let input = config:: Input :: Str {
179- name : driver :: anon_src ( ) ,
179+ name : filename . to_owned ( ) ,
180180 input : test. to_owned ( ) ,
181181 } ;
182182 let outputs = OutputTypes :: new ( & [ ( OutputType :: Exe , None ) ] ) ;
@@ -313,8 +313,11 @@ fn runtest(test: &str, cratename: &str, cfgs: Vec<String>, libs: SearchPaths,
313313 }
314314}
315315
316- pub fn maketest ( s : & str , cratename : Option < & str > , dont_insert_main : bool ,
317- opts : & TestOptions ) -> String {
316+ pub fn make_test ( s : & str ,
317+ cratename : Option < & str > ,
318+ dont_insert_main : bool ,
319+ opts : & TestOptions )
320+ -> String {
318321 let ( crate_attrs, everything_else) = partition_source ( s) ;
319322
320323 let mut prog = String :: new ( ) ;
@@ -498,18 +501,19 @@ impl Collector {
498501 rustc_driver:: in_rustc_thread ( move || {
499502 io:: set_panic ( panic) ;
500503 io:: set_print ( print) ;
501- runtest ( & test,
502- & cratename,
503- cfgs,
504- libs,
505- externs,
506- should_panic,
507- no_run,
508- as_test_harness,
509- compile_fail,
510- error_codes,
511- & opts,
512- maybe_sysroot)
504+ run_test ( & test,
505+ & cratename,
506+ & filename,
507+ cfgs,
508+ libs,
509+ externs,
510+ should_panic,
511+ no_run,
512+ as_test_harness,
513+ compile_fail,
514+ error_codes,
515+ & opts,
516+ maybe_sysroot)
513517 } )
514518 } {
515519 Ok ( ( ) ) => ( ) ,
0 commit comments