Add --writeJsonSummary option to gm
This writes out a JSON file containing expected and actual checksum values for every test.
Next step: allow the same checksum file to be compared against, instead of PNG files.
Committed: https://code.google.com/p/skia/source/detail?r=6843
https://codereview.appspot.com/6940053/diff/1/gm/tests/outputs/compared-against-different-pixels/output-expected/json-summary.txt File gm/tests/outputs/compared-against-different-pixels/output-expected/json-summary.txt (right): https://codereview.appspot.com/6940053/diff/1/gm/tests/outputs/compared-against-different-pixels/output-expected/json-summary.txt#newcode10 gm/tests/outputs/compared-against-different-pixels/output-expected/json-summary.txt:10: "checksums" : [ 15161495552186645995 ], The idea is that ...
11 years, 11 months ago
(2012-12-13 21:45:16 UTC)
#2
11 years, 11 months ago
(2012-12-14 18:26:03 UTC)
#4
https://codereview.appspot.com/6940053/diff/1/gm/gmmain.cpp
File gm/gmmain.cpp (right):
https://codereview.appspot.com/6940053/diff/1/gm/gmmain.cpp#newcode85
gm/gmmain.cpp:85: const static char kJsonKey_ExpectedResults_Ignore[] =
"ignore";
On 2012/12/13 22:00:07, EricB wrote:
> Maybe "suppress-error" instead of "ignore"? To me "ignore" implies that we
> shouldn't even bother rendering the image. Or maybe "ignore-failure"?
Good idea; changed to "ignore-failure".
You'll see that I also changed the ActualResults section to be split into 3
parts: Failed, FailureIgnored, and Succeeded. I figured that most consumers of
these results would only want to see the failures anyway, so why make them
examine every record just to find the failures?
Let me know if you think that change is problematic, or if you think of a more
clever way of dicing up the output.
https://codereview.appspot.com/6940053/diff/1/gm/tests/run.sh
File gm/tests/run.sh (right):
https://codereview.appspot.com/6940053/diff/1/gm/tests/run.sh#newcode1
gm/tests/run.sh:1: #!/bin/bash
On 2012/12/13 22:00:07, EricB wrote:
> How about a test which exercises the "checksum can be one of several" code
path?
Well, I haven't actually added the code yet that will read in a JSON file for
comparisons (instead of reading individual expected image files). So for now,
we only compare each actual against a single expected.
But when I add that code, absolutely, I'll add a test.
https://codereview.appspot.com/6940053/diff/6001/gm/tests/outputs/compared-ag...
File
gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt
(right):
https://codereview.appspot.com/6940053/diff/6001/gm/tests/outputs/compared-ag...
gm/tests/outputs/compared-against-empty-dir/output-expected/json-summary.txt:13:
"checksums" : null,
This new test shows that a missing expected image is interpreted as: no known
checksum to compare against, and ignore any failure.
Issue 6940053: Add --writeJsonSummary option to gm
(Closed)
Created 11 years, 11 months ago by epoger
Modified 11 years, 10 months ago
Reviewers: EricB
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 8