auto merge of #2349 : zwarich/servo/reftest-print-diff, r=larsbergstrom

Having to match the numbered results in /tmp with the failing tests was bothering me, and I figured it would be better to print the path with the failure.
This commit is contained in:
bors-servo 2014-05-06 18:13:35 -04:00
commit 0bb838a58b

View file

@ -162,7 +162,8 @@ fn check_reftest(reftest: Reftest) {
}).collect(); }).collect();
if pixels.iter().any(|&a| a < 255) { if pixels.iter().any(|&a| a < 255) {
let output = from_str::<Path>(format!("/tmp/servo-reftest-{:06u}-diff.png", reftest.id)).unwrap(); let output_str = format!("/tmp/servo-reftest-{:06u}-diff.png", reftest.id);
let output = from_str::<Path>(output_str).unwrap();
let img = png::Image { let img = png::Image {
width: left.width, width: left.width,
@ -173,7 +174,7 @@ fn check_reftest(reftest: Reftest) {
let res = png::store_png(&img, &output); let res = png::store_png(&img, &output);
assert!(res.is_ok()); assert!(res.is_ok());
assert!(reftest.kind == Different); assert!(reftest.kind == Different, "rendering difference: {}", output_str);
} else { } else {
assert!(reftest.kind == Same); assert!(reftest.kind == Same);
} }