Merge pull request #122 from Ekleog/nicer-output

Output nicer logs for testing
This commit is contained in:
Graham Christensen 2018-03-15 21:28:25 -04:00 committed by GitHub
commit 08f892b771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -323,7 +323,7 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
job.attrs.clone(),
);
println!("Can build: {}, Cannot build: {}",
println!("Can build: '{}', Cannot build: '{}'",
can_build.join(", "),
cannot_build.join(", "));
@ -370,7 +370,10 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
};
println!("ok built ({:?}), building", success);
println!("Lines: {:?}", snippet_log);
println!("Lines:\n-----8<-----");
snippet_log.iter().inspect(|x| println!("{}", x)).last();
println!("----->8-----");
assert!(success);
let last10lines: Vec<String> = snippet_log.into_iter().collect::<Vec<String>>();