зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #2349 - Print the location of the image diff when a ref test fails (from zwarich: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. Source-Repo: https://github.com/servo/servo Source-Revision: 0bb838a58b80dfbf63d09342e15d0af45277d073
This commit is contained in:
Родитель
51cf935e78
Коммит
23928990b9
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче