self.fatal_proc_rec("compilation failed!", &proc_res);
}
+ let expected_errors = errors::load_errors(&self.testpaths.file, self.revision);
+ if !expected_errors.is_empty() {
+ self.check_expected_errors(expected_errors, &proc_res);
+ }
+
let proc_res = self.exec_compiled_test();
if !proc_res.status.success() {
fn check_expected_errors(&self,
expected_errors: Vec<errors::Error>,
proc_res: &ProcRes) {
- if proc_res.status.success() {
+ if proc_res.status.success() &&
+ expected_errors.iter().any(|x| x.kind == Some(ErrorKind::Error)) {
self.fatal_proc_rec("process did not return an error status", proc_res);
}
match self.config.mode {
CompileFail |
ParseFail |
+ RunPass |
Incremental => {
// If we are extracting and matching errors in the new
// fashion, then you want JSON mode. Old-skool error
args.push(dir_opt);
}
RunFail |
- RunPass |
RunPassValgrind |
Pretty |
DebugInfoGdb |
// runs.
let incremental_dir = self.incremental_dir();
if incremental_dir.exists() {
- fs::remove_dir_all(&incremental_dir).unwrap();
+ // Canonicalizing the path will convert it to the //?/ format
+ // on Windows, which enables paths longer than 260 character
+ let canonicalized = incremental_dir.canonicalize().unwrap();
+ fs::remove_dir_all(canonicalized).unwrap();
}
fs::create_dir_all(&incremental_dir).unwrap();
/// Directory where incremental work products are stored.
fn incremental_dir(&self) -> PathBuf {
- self.output_base_name().with_extension("incremental")
+ self.output_base_name().with_extension("inc")
}
fn run_rmake_test(&self) {