Output nicer logs for testing

This commit is contained in:
Léo Gaspard 2018-03-16 01:15:23 +01:00
parent 6dc6019e43
commit 6d33c2e05a
No known key found for this signature in database
GPG key ID: 8A55848B6090F9CF

View file

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