Abort dm/nanobench on bad configs.
Adjust the configs specified by recipes to avoid the new error.
Change-Id: I23e31355e2faaab919d92abdb37a6f70cd2da1ff
Reviewed-on: https://skia-review.googlesource.com/32862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 11527bf..6d35391 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -60,6 +60,7 @@
extern bool gSkForceRasterPipelineBlitter;
+DECLARE_bool(undefok);
DEFINE_string(src, "tests gm skp image", "Source types to test.");
DEFINE_bool(nameByHash, false,
"If true, write to FLAGS_writePath[0]/<hash>.png instead of "
@@ -979,9 +980,15 @@
}
// 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);
+ if (configs.count() == 0 || FLAGS_config.count() == 0 ||
+ // If we've been told to ignore undefined flags, we're okay.
+ FLAGS_undefok ||
+ // Otherwise, make sure that all specified configs have become sinks.
+ configs.count() == gSinks.count()) {
+ return true;
+ }
+ info("Invalid --config. Use --undefok to bypass this warning.\n");
+ return false;
}
static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) {