mirror of
https://github.com/servo/servo.git
synced 2025-06-23 08:34:42 +01:00
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:
commit
0bb838a58b
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue