diff options
author | rmistry <rmistry@google.com> | 2016-04-26 08:27:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-26 08:27:49 -0700 |
commit | cda08f84907136186ee2dcfde1dd04a8531e5315 (patch) | |
tree | 48b217c311ff23b1acf83128e363928c60ff49c6 /tools | |
parent | 002c92bcbf3baf6689b0c1ece11eb01c32ac770a (diff) |
Return error code when get_images_from_skps has failures.
BUG=skia:4981
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1916183002
Review URL: https://codereview.chromium.org/1916183002
Diffstat (limited to 'tools')
-rw-r--r-- | tools/get_images_from_skps.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/get_images_from_skps.cpp b/tools/get_images_from_skps.cpp index f963b9a86b..a78c412a1b 100644 --- a/tools/get_images_from_skps.cpp +++ b/tools/get_images_from_skps.cpp @@ -157,12 +157,14 @@ int main(int argc, char** argv) { SkDebugf("%d known, %d unknown\n", gKnown, totalUnknowns); fRoot["totalFailures"] = totalUnknowns; fRoot["totalSuccesses"] = gKnown; - if (totalUnknowns > 0 && !FLAGS_failuresJsonPath.isEmpty()) { - SkDebugf("Writing failures to %s\n", FLAGS_failuresJsonPath[0]); - SkFILEWStream stream(FLAGS_failuresJsonPath[0]); - stream.writeText(Json::StyledWriter().write(fRoot).c_str()); - stream.flush(); + if (totalUnknowns > 0) { + if (!FLAGS_failuresJsonPath.isEmpty()) { + SkDebugf("Writing failures to %s\n", FLAGS_failuresJsonPath[0]); + SkFILEWStream stream(FLAGS_failuresJsonPath[0]); + stream.writeText(Json::StyledWriter().write(fRoot).c_str()); + stream.flush(); + } + return -1; } - return 0; } |