aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/gmmain.cpp
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 17:24:20 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-10 17:24:20 +0000
commit1ddfbc201a5445d2da17d2a087a1ec88cc980ffb (patch)
treeb50a06256335ef6268c220e45f209b97dcfe6775 /gm/gmmain.cpp
parent0fbe01fa53706f5e816da2485b5243fdb3d3fef3 (diff)
gm: if test has no expectations, record its result as no-expectations regardless of ignoreFailure
After https://code.google.com/p/skia/source/detail?r=11640 ('Ignore any pdf-poppler GM failures'), there are a bunch of pdf-poppler tests showing up as failure-ignored at http://c128.i.corp.google.com/production-gm-diffs/latest/view.html Make them go away. R=scroggo@google.com Review URL: https://codereview.chromium.org/26650005 git-svn-id: http://skia.googlecode.com/svn/trunk@11703 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm/gmmain.cpp')
-rw-r--r--gm/gmmain.cpp50
1 files changed, 26 insertions, 24 deletions
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index e29a1d8d8f..3ee90fe084 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -821,7 +821,7 @@ public:
}
/**
- * Add this result to the appropriate JSON collection of actual results,
+ * Add this result to the appropriate JSON collection of actual results (but just ONE),
* depending on errors encountered.
*/
void add_actual_results_to_json_summary(const char testName[],
@@ -829,33 +829,35 @@ public:
ErrorCombination errors,
bool ignoreFailure) {
Json::Value jsonActualResults = actualResultDigest.asJsonTypeValuePair();
+ Json::Value *resultCollection = NULL;
+
if (errors.isEmpty()) {
- this->fJsonActualResults_Succeeded[testName] = jsonActualResults;
- } else {
+ resultCollection = &this->fJsonActualResults_Succeeded;
+ } else if (errors.includes(kRenderModeMismatch_ErrorType)) {
+ resultCollection = &this->fJsonActualResults_Failed;
+ } else if (errors.includes(kExpectationsMismatch_ErrorType)) {
if (ignoreFailure) {
- this->fJsonActualResults_FailureIgnored[testName] =
- jsonActualResults;
+ resultCollection = &this->fJsonActualResults_FailureIgnored;
} else {
- if (errors.includes(kMissingExpectations_ErrorType)) {
- // TODO: What about the case where there IS an
- // expected image hash digest, but that gm test
- // doesn't actually run? For now, those cases
- // will always be ignored, because gm only looks
- // at expectations that correspond to gm tests
- // that were actually run.
- //
- // Once we have the ability to express
- // expectations as a JSON file, we should fix this
- // (and add a test case for which an expectation
- // is given but the test is never run).
- this->fJsonActualResults_NoComparison[testName] =
- jsonActualResults;
- }
- if (errors.includes(kExpectationsMismatch_ErrorType) ||
- errors.includes(kRenderModeMismatch_ErrorType)) {
- this->fJsonActualResults_Failed[testName] = jsonActualResults;
- }
+ resultCollection = &this->fJsonActualResults_Failed;
}
+ } else if (errors.includes(kMissingExpectations_ErrorType)) {
+ // TODO: What about the case where there IS an expected
+ // image hash digest, but that gm test doesn't actually
+ // run? For now, those cases will always be ignored,
+ // because gm only looks at expectations that correspond
+ // to gm tests that were actually run.
+ //
+ // Once we have the ability to express expectations as a
+ // JSON file, we should fix this (and add a test case for
+ // which an expectation is given but the test is never
+ // run).
+ resultCollection = &this->fJsonActualResults_NoComparison;
+ }
+
+ // If none of the above cases match, we don't add it to ANY tally of actual results.
+ if (resultCollection) {
+ (*resultCollection)[testName] = jsonActualResults;
}
}