Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: tools/get_images_from_skps.cpp

Issue 1916183002: Return error code when get_images_from_skps has failures (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Undo test change Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/get_images_from_skps.cpp
diff --git a/tools/get_images_from_skps.cpp b/tools/get_images_from_skps.cpp
index f963b9a86b59bd08d8d6a04afe27e2de824df30f..a78c412a1bf35f07742cde2de9d43c9aa1145679 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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698