@@ -33,7 +33,7 @@ use std::fs;
33
33
use std:: path:: { Path , PathBuf } ;
34
34
use getopts:: { optopt, optflag, reqopt} ;
35
35
use common:: Config ;
36
- use common:: { Pretty , DebugInfoGdb , DebugInfoLldb , Codegen } ;
36
+ use common:: { Pretty , DebugInfoGdb , DebugInfoLldb } ;
37
37
use util:: logv;
38
38
39
39
pub mod procsrv;
@@ -63,7 +63,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
63
63
reqopt( "" , "rustc-path" , "path to rustc to use for compiling" , "PATH" ) ,
64
64
reqopt( "" , "rustdoc-path" , "path to rustdoc to use for compiling" , "PATH" ) ,
65
65
reqopt( "" , "python" , "path to python to use for doc tests" , "PATH" ) ,
66
- optopt( "" , "clang-path" , "path to executable for codegen tests" , "PATH" ) ,
67
66
optopt( "" , "valgrind-path" , "path to Valgrind executable for Valgrind tests" , "PROGRAM" ) ,
68
67
optflag( "" , "force-valgrind" , "fail if Valgrind tests cannot be run under Valgrind" ) ,
69
68
optopt( "" , "llvm-bin-path" , "path to directory holding llvm binaries" , "DIR" ) ,
@@ -133,7 +132,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
133
132
rustc_path : opt_path ( matches, "rustc-path" ) ,
134
133
rustdoc_path : opt_path ( matches, "rustdoc-path" ) ,
135
134
python : matches. opt_str ( "python" ) . unwrap ( ) ,
136
- clang_path : matches. opt_str ( "clang-path" ) . map ( |s| PathBuf :: from ( & s) ) ,
137
135
valgrind_path : matches. opt_str ( "valgrind-path" ) ,
138
136
force_valgrind : matches. opt_present ( "force-valgrind" ) ,
139
137
llvm_bin_path : matches. opt_str ( "llvm-bin-path" ) . map ( |s| PathBuf :: from ( & s) ) ,
@@ -284,13 +282,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
284
282
let file = file. unwrap ( ) . path ( ) ;
285
283
debug ! ( "inspecting file {:?}" , file. display( ) ) ;
286
284
if is_test ( config, & file) {
287
- let t = make_test ( config, & file, || {
288
- match config. mode {
289
- Codegen => make_metrics_test_closure ( config, & file) ,
290
- _ => make_test_closure ( config, & file)
291
- }
292
- } ) ;
293
- tests. push ( t)
285
+ tests. push ( make_test ( config, & file) )
294
286
}
295
287
}
296
288
tests
@@ -323,16 +315,15 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
323
315
return valid;
324
316
}
325
317
326
- pub fn make_test < F > ( config : & Config , testfile : & Path , f : F ) -> test:: TestDescAndFn where
327
- F : FnOnce ( ) -> test:: TestFn ,
318
+ pub fn make_test ( config : & Config , testfile : & Path ) -> test:: TestDescAndFn
328
319
{
329
320
test:: TestDescAndFn {
330
321
desc : test:: TestDesc {
331
322
name : make_test_name ( config, testfile) ,
332
323
ignore : header:: is_test_ignored ( config, testfile) ,
333
324
should_panic : test:: ShouldPanic :: No ,
334
325
} ,
335
- testfn : f ( ) ,
326
+ testfn : make_test_closure ( config , & testfile ) ,
336
327
}
337
328
}
338
329
@@ -357,14 +348,6 @@ pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
357
348
} ) )
358
349
}
359
350
360
- pub fn make_metrics_test_closure ( config : & Config , testfile : & Path ) -> test:: TestFn {
361
- let config = ( * config) . clone ( ) ;
362
- let testfile = testfile. to_path_buf ( ) ;
363
- test:: DynMetricFn ( box move |mm : & mut test:: MetricMap | {
364
- runtest:: run_metrics ( config, & testfile, mm)
365
- } )
366
- }
367
-
368
351
fn extract_gdb_version ( full_version_line : Option < String > ) -> Option < String > {
369
352
match full_version_line {
370
353
Some ( ref full_version_line)
0 commit comments