// parallel (especially when we have lots and lots of child processes).
// For context, see #8904
io::test::raise_fd_limit();
- let res = test::run_tests_console(&opts, tests.move_iter().collect());
+ let res = test::run_tests_console(&opts, tests.into_iter().collect());
match res {
Ok(true) => {}
Ok(false) => fail!("Some tests failed"),
fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
match full_version_line {
- Some(full_version_line) => {
+ Some(ref full_version_line)
+ if full_version_line.as_slice().trim().len() > 0 => {
let full_version_line = full_version_line.as_slice().trim();
- let re = Regex::new(r"[^0-9]([0-9]\.[0-9])([^0-9]|$)").unwrap();
+
+ let re = Regex::new(r"(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)").unwrap();
match re.captures(full_version_line) {
Some(captures) => {
- Some(captures.at(1).to_string())
+ Some(captures.at(2).to_string())
+ }
+ None => {
+ println!("Could not extract GDB version from line '{}'",
+ full_version_line);
+ None
}
- None => None
}
},
- None => None
+ _ => None
}
-}
\ No newline at end of file
+}