Add VALIDATE_FAILURE_IS_A_TOOL_FAILURE to specify whether a failure in validation

means the tool should return failure or not. For now it is not defined, which
means any failed pixels are still reported to stdout, but the tool does not
return an error, allowing the bots to go green (until we can fix these failures).
Review URL: https://codereview.appspot.com/7105056

git-svn-id: http://skia.googlecode.com/svn/trunk@7211 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2013-01-15 21:54:27 +00:00
parent 23595a59a7
commit f14e4b0482

View File

@ -21,6 +21,10 @@
#include "PictureRenderer.h"
#include "picture_utils.h"
// Define this if validation failures should cause the tool to return failure
// If not, it will still printf the messages.
//#define VALIDATE_FAILURE_IS_A_TOOL_FAILURE
static void usage(const char* argv0) {
SkDebugf("SkPicture rendering tool\n");
SkDebugf("\n"
@ -226,12 +230,17 @@ static bool render_picture(const SkString& inputPath, const SkString* outputDir,
x, y,
*referenceBitmap->getAddr32(x, y),
*bitmap->getAddr32(x, y));
#ifdef VALIDATE_FAILURE_IS_A_TOOL_FAILURE
SkDELETE(bitmap);
SkDELETE(referenceBitmap);
return false;
#else
goto DONE;
#endif
}
}
}
DONE:
SkDELETE(referenceBitmap);
}