]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/compiletest/src/main.rs
Improve error message in make_tests
[rust.git] / src / tools / compiletest / src / main.rs
index 467b7771c152eaea290ea808ba8c2cef0f106914..9bf427953a15302c006bd799519bfcd108b8c48a 100644 (file)
@@ -1,6 +1,7 @@
 #![crate_name = "compiletest"]
 #![feature(test)]
 #![feature(vec_remove_item)]
+#![deny(warnings)]
 
 extern crate test;
 
@@ -253,7 +254,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
     if args.len() == 1 || args[1] == "-h" || args[1] == "--help" {
         let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
         println!("{}", opts.usage(&message));
-        println!("");
+        println!();
         panic!()
     }
 
@@ -265,7 +266,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
     if matches.opt_present("h") || matches.opt_present("help") {
         let message = format!("Usage: {} [OPTIONS]  [TESTNAME...]", argv0);
         println!("{}", opts.usage(&message));
-        println!("");
+        println!();
         panic!()
     }
 
@@ -567,6 +568,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
         skip: vec![],
         list: false,
         options: test::Options::new(),
+        time_options: None,
     }
 }
 
@@ -579,7 +581,7 @@ pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
         &config.src_base,
         &PathBuf::new(),
         &mut tests,
-    ).unwrap();
+    ).expect(&format!("Could not read tests from {}", config.src_base.display()));
     tests
 }
 
@@ -702,6 +704,7 @@ pub fn make_test(config: &Config, testpaths: &TestPaths) -> Vec<test::TestDescAn
                     ignore,
                     should_panic,
                     allow_fail: false,
+                    test_type: test::TestType::Unknown,
                 },
                 testfn: make_test_closure(config, early_props.ignore, testpaths, revision),
             }