Print the location of the image diff when a ref test fails.

This commit is contained in:
Cameron Zwarich 2014-05-06 14:30:20 -07:00
parent 03e0f911ec
commit 2191951fd8

View file

@ -162,7 +162,8 @@ fn check_reftest(reftest: Reftest) {
}).collect();
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 {
width: left.width,
@ -173,7 +174,7 @@ fn check_reftest(reftest: Reftest) {
let res = png::store_png(&img, &output);
assert!(res.is_ok());
assert!(reftest.kind == Different);
assert!(reftest.kind == Different, "rendering difference: {}", output_str);
} else {
assert!(reftest.kind == Same);
}