Make DM fail if no configs were successfully created
BUG=skia:5261 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957273002 Review-Url: https://codereview.chromium.org/1957273002
This commit is contained in:
parent
e6cad6b370
commit
05c987cee3
11
dm/DM.cpp
11
dm/DM.cpp
@ -923,7 +923,7 @@ static Sink* create_via(const SkString& tag, Sink* wrapped) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gather_sinks() {
|
static bool gather_sinks() {
|
||||||
SkCommandLineConfigArray configs;
|
SkCommandLineConfigArray configs;
|
||||||
ParseConfigs(FLAGS_config, &configs);
|
ParseConfigs(FLAGS_config, &configs);
|
||||||
for (int i = 0; i < configs.count(); i++) {
|
for (int i = 0; i < configs.count(); i++) {
|
||||||
@ -952,6 +952,11 @@ static void gather_sinks() {
|
|||||||
push_sink(config, sink);
|
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) {
|
static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) {
|
||||||
@ -1323,7 +1328,9 @@ int dm_main() {
|
|||||||
if (!gather_srcs()) {
|
if (!gather_srcs()) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
gather_sinks();
|
if (!gather_sinks()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
gather_tests();
|
gather_tests();
|
||||||
gPending = gSrcs.count() * gSinks.count() + gParallelTests.count() + gSerialTests.count();
|
gPending = gSrcs.count() * gSinks.count() + gParallelTests.count() + gSerialTests.count();
|
||||||
info("%d srcs * %d sinks + %d tests == %d tasks",
|
info("%d srcs * %d sinks + %d tests == %d tasks",
|
||||||
|
Loading…
Reference in New Issue
Block a user