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

Unified Diff: dm/DM.cpp

Issue 1957273002: Make DM fail if no configs were successfully created (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Spelling error Created 4 years, 7 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: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 9dbd43adda05367aa7ec1fccbda964de73593d59..e10ccea5ce0a9a7da9bd85d94214cdca039bdc6a 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -923,7 +923,7 @@ static Sink* create_via(const SkString& tag, Sink* wrapped) {
return nullptr;
}
-static void gather_sinks() {
+static bool gather_sinks() {
SkCommandLineConfigArray configs;
ParseConfigs(FLAGS_config, &configs);
for (int i = 0; i < configs.count(); i++) {
@@ -952,6 +952,11 @@ static void gather_sinks() {
push_sink(config, sink);
}
}
+
+ // If no configs were requested (just running tests, perhaps?), then we're okay.
+ // Otherwise, make sure that at least one sink was constructed correctly. This catches
+ // the case of bots without a GPU being assigned GPU configs.
+ return (configs.count() == 0) || (gSinks.count() > 0);
}
static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) {
@@ -1323,7 +1328,9 @@ int dm_main() {
if (!gather_srcs()) {
return 1;
}
- gather_sinks();
+ if (!gather_sinks()) {
+ return 1;
+ }
gather_tests();
gPending = gSrcs.count() * gSinks.count() + gParallelTests.count() + gSerialTests.count();
info("%d srcs * %d sinks + %d tests == %d tasks",
« 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