aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar rmistry <rmistry@google.com>2016-04-26 08:27:49 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-26 08:27:49 -0700
commitcda08f84907136186ee2dcfde1dd04a8531e5315 (patch)
tree48b217c311ff23b1acf83128e363928c60ff49c6 /tools
parent002c92bcbf3baf6689b0c1ece11eb01c32ac770a (diff)
Return error code when get_images_from_skps has failures.
Diffstat (limited to 'tools')
-rw-r--r--tools/get_images_from_skps.cpp14
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;
}