mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 1 | // Main binary for DM. |
| 2 | // For a high-level overview, please see dm/README. |
| 3 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 4 | #include "SkBenchmark.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 5 | #include "SkCommandLineFlags.h" |
| 6 | #include "SkForceLinking.h" |
| 7 | #include "SkGraphics.h" |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 8 | #include "SkPicture.h" |
rmistry@google.com | d6bab02 | 2013-12-02 13:50:38 +0000 | [diff] [blame] | 9 | #include "SkString.h" |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 10 | #include "Test.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 11 | #include "gm.h" |
| 12 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 13 | #include "DMBenchTask.h" |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 14 | #include "DMCpuGMTask.h" |
| 15 | #include "DMGpuGMTask.h" |
commit-bot@chromium.org | 787227d | 2014-03-26 21:26:15 +0000 | [diff] [blame] | 16 | #include "DMGpuSupport.h" |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame^] | 17 | #include "DMPDFTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 18 | #include "DMReporter.h" |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 19 | #include "DMSKPTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 20 | #include "DMTask.h" |
| 21 | #include "DMTaskRunner.h" |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 22 | #include "DMTestTask.h" |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 23 | #include "DMWriteTask.h" |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 24 | |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame^] | 25 | #ifdef SK_BUILD_POPPLER |
| 26 | # include "SkPDFRasterizer.h" |
| 27 | # define RASTERIZE_PDF_PROC SkPopplerRasterizePDF |
| 28 | #else |
| 29 | # define RASTERIZE_PDF_PROC NULL |
| 30 | #endif |
| 31 | |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 32 | #include <ctype.h> |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 33 | |
| 34 | using skiagm::GM; |
| 35 | using skiagm::GMRegistry; |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 36 | using skiatest::Test; |
| 37 | using skiatest::TestRegistry; |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 38 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 39 | DEFINE_int32(threads, -1, "Threads for CPU work. Default NUM_CPUS."); |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 40 | DEFINE_int32(gpuThreads, 1, "Threads for GPU work."); |
commit-bot@chromium.org | a267d41 | 2014-05-16 18:27:11 +0000 | [diff] [blame] | 41 | #ifdef SK_BUILD_JSON_WRITER |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 42 | DEFINE_string2(expectations, r, "", |
| 43 | "If a directory, compare generated images against images under this path. " |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 44 | "If a file, compare generated images against JSON expectations at this path." |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 45 | ); |
commit-bot@chromium.org | a267d41 | 2014-05-16 18:27:11 +0000 | [diff] [blame] | 46 | #else |
| 47 | DEFINE_string2(expectations, r, "", |
| 48 | "If a directory, compare generated images against images under this path. " |
| 49 | ); |
| 50 | #endif |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 51 | DEFINE_string2(resources, i, "resources", "Path to resources directory."); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 52 | DEFINE_string(match, "", "[~][^]substring[$] [...] of GM name to run.\n" |
| 53 | "Multiple matches may be separated by spaces.\n" |
| 54 | "~ causes a matching GM to always be skipped\n" |
| 55 | "^ requires the start of the GM to match\n" |
| 56 | "$ requires the end of the GM to match\n" |
| 57 | "^ and $ requires an exact match\n" |
| 58 | "If a GM does not match any list entry,\n" |
| 59 | "it is skipped unless some list entry starts with ~"); |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame^] | 60 | DEFINE_string(config, "565 8888 pdf gpu nonrendering", |
| 61 | "Options: 565 8888 pdf gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 " |
| 62 | "gpunull gpudebug angle mesa"); |
| 63 | DEFINE_bool(dryRun, false, |
| 64 | "Just print the tests that would be run, without actually running them."); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 65 | DEFINE_bool(leaks, false, "Print leaked instance-counted objects at exit?"); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 66 | DEFINE_string(skps, "", "Directory to read skps from."); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 67 | |
| 68 | DEFINE_bool(gms, true, "Run GMs?"); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 69 | DEFINE_bool(benches, true, "Run benches? Does not run GMs-as-benches."); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 70 | DEFINE_bool(tests, true, "Run tests?"); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 71 | |
commit-bot@chromium.org | a65e2fd | 2014-05-30 17:23:31 +0000 | [diff] [blame] | 72 | DECLARE_bool(verbose); |
| 73 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 74 | __SK_FORCE_IMAGE_DECODER_LINKING; |
| 75 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 76 | // "FooBar" -> "foobar". Obviously, ASCII only. |
| 77 | static SkString lowercase(SkString s) { |
| 78 | for (size_t i = 0; i < s.size(); i++) { |
| 79 | s[i] = tolower(s[i]); |
| 80 | } |
| 81 | return s; |
| 82 | } |
| 83 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 84 | static const GrContextFactory::GLContextType native = GrContextFactory::kNative_GLContextType; |
commit-bot@chromium.org | b640186 | 2014-03-12 14:46:31 +0000 | [diff] [blame] | 85 | static const GrContextFactory::GLContextType nvpr = GrContextFactory::kNVPR_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 86 | static const GrContextFactory::GLContextType null = GrContextFactory::kNull_GLContextType; |
| 87 | static const GrContextFactory::GLContextType debug = GrContextFactory::kDebug_GLContextType; |
| 88 | static const GrContextFactory::GLContextType angle = |
| 89 | #if SK_ANGLE |
| 90 | GrContextFactory::kANGLE_GLContextType; |
| 91 | #else |
| 92 | native; |
| 93 | #endif |
| 94 | static const GrContextFactory::GLContextType mesa = |
| 95 | #if SK_MESA |
bsalomon@google.com | 9dccafa | 2014-05-02 14:43:12 +0000 | [diff] [blame] | 96 | GrContextFactory::kMESA_GLContextType; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 97 | #else |
| 98 | native; |
| 99 | #endif |
| 100 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 101 | static void kick_off_gms(const SkTDArray<GMRegistry::Factory>& gms, |
| 102 | const SkTArray<SkString>& configs, |
| 103 | const DM::Expectations& expectations, |
| 104 | DM::Reporter* reporter, |
| 105 | DM::TaskRunner* tasks) { |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 106 | #define START(name, type, ...) \ |
| 107 | if (lowercase(configs[j]).equals(name)) { \ |
| 108 | tasks->add(SkNEW_ARGS(DM::type, \ |
| 109 | (name, reporter, tasks, expectations, gms[i], ## __VA_ARGS__))); \ |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 110 | } |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 111 | for (int i = 0; i < gms.count(); i++) { |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 112 | for (int j = 0; j < configs.count(); j++) { |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame^] | 113 | START("565", CpuGMTask, kRGB_565_SkColorType); |
| 114 | START("8888", CpuGMTask, kN32_SkColorType); |
| 115 | START("gpu", GpuGMTask, native, 0); |
| 116 | START("msaa4", GpuGMTask, native, 4); |
| 117 | START("msaa16", GpuGMTask, native, 16); |
| 118 | START("nvprmsaa4", GpuGMTask, nvpr, 4); |
commit-bot@chromium.org | b640186 | 2014-03-12 14:46:31 +0000 | [diff] [blame] | 119 | START("nvprmsaa16", GpuGMTask, nvpr, 16); |
mtklein | 30bf3e2 | 2014-06-03 13:57:14 -0700 | [diff] [blame^] | 120 | START("gpunull", GpuGMTask, null, 0); |
| 121 | START("gpudebug", GpuGMTask, debug, 0); |
| 122 | START("angle", GpuGMTask, angle, 0); |
| 123 | START("mesa", GpuGMTask, mesa, 0); |
| 124 | START("pdf", PDFTask, RASTERIZE_PDF_PROC); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 125 | } |
| 126 | } |
| 127 | #undef START |
| 128 | } |
| 129 | |
| 130 | static void kick_off_benches(const SkTDArray<BenchRegistry::Factory>& benches, |
| 131 | const SkTArray<SkString>& configs, |
| 132 | DM::Reporter* reporter, |
| 133 | DM::TaskRunner* tasks) { |
| 134 | #define START(name, type, ...) \ |
| 135 | if (lowercase(configs[j]).equals(name)) { \ |
| 136 | tasks->add(SkNEW_ARGS(DM::type, (name, reporter, tasks, benches[i], ## __VA_ARGS__))); \ |
| 137 | } |
| 138 | for (int i = 0; i < benches.count(); i++) { |
| 139 | for (int j = 0; j < configs.count(); j++) { |
| 140 | START("nonrendering", NonRenderingBenchTask); |
| 141 | START("565", CpuBenchTask, kRGB_565_SkColorType); |
commit-bot@chromium.org | 28fcae2 | 2014-04-11 17:15:40 +0000 | [diff] [blame] | 142 | START("8888", CpuBenchTask, kN32_SkColorType); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 143 | START("gpu", GpuBenchTask, native, 0); |
| 144 | START("msaa4", GpuBenchTask, native, 4); |
| 145 | START("msaa16", GpuBenchTask, native, 16); |
commit-bot@chromium.org | b640186 | 2014-03-12 14:46:31 +0000 | [diff] [blame] | 146 | START("nvprmsaa4", GpuBenchTask, nvpr, 4); |
| 147 | START("nvprmsaa16", GpuBenchTask, nvpr, 16); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 148 | START("gpunull", GpuBenchTask, null, 0); |
| 149 | START("gpudebug", GpuBenchTask, debug, 0); |
| 150 | START("angle", GpuBenchTask, angle, 0); |
| 151 | START("mesa", GpuBenchTask, mesa, 0); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 152 | } |
| 153 | } |
| 154 | #undef START |
| 155 | } |
| 156 | |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 157 | static void kick_off_tests(const SkTDArray<TestRegistry::Factory>& tests, |
| 158 | DM::Reporter* reporter, |
| 159 | DM::TaskRunner* tasks) { |
| 160 | for (int i = 0; i < tests.count(); i++) { |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 161 | SkAutoTDelete<Test> test(tests[i](NULL)); |
| 162 | if (test->isGPUTest()) { |
| 163 | tasks->add(SkNEW_ARGS(DM::GpuTestTask, (reporter, tasks, tests[i]))); |
| 164 | } else { |
| 165 | tasks->add(SkNEW_ARGS(DM::CpuTestTask, (reporter, tasks, tests[i]))); |
| 166 | } |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 167 | } |
| 168 | } |
| 169 | |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 170 | static void kick_off_skps(DM::Reporter* reporter, DM::TaskRunner* tasks) { |
| 171 | if (FLAGS_skps.isEmpty()) { |
| 172 | return; |
| 173 | } |
| 174 | |
| 175 | SkOSFile::Iter it(FLAGS_skps[0], ".skp"); |
| 176 | SkString filename; |
| 177 | while (it.next(&filename)) { |
| 178 | if (SkCommandLineFlags::ShouldSkip(FLAGS_match, filename.c_str())) { |
| 179 | continue; |
| 180 | } |
| 181 | |
| 182 | const SkString path = SkOSPath::SkPathJoin(FLAGS_skps[0], filename.c_str()); |
| 183 | |
| 184 | SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path.c_str())); |
| 185 | if (stream.get() == NULL) { |
| 186 | SkDebugf("Could not read %s.\n", path.c_str()); |
| 187 | exit(1); |
| 188 | } |
| 189 | SkAutoTUnref<SkPicture> pic(SkPicture::CreateFromStream(stream.get())); |
| 190 | if (pic.get() == NULL) { |
| 191 | SkDebugf("Could not read %s as an SkPicture.\n", path.c_str()); |
| 192 | exit(1); |
| 193 | } |
| 194 | |
| 195 | tasks->add(SkNEW_ARGS(DM::SKPTask, (reporter, tasks, pic.detach(), filename))); |
| 196 | } |
| 197 | } |
| 198 | |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 199 | static void report_failures(const SkTArray<SkString>& failures) { |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 200 | if (failures.count() == 0) { |
| 201 | return; |
| 202 | } |
| 203 | |
| 204 | SkDebugf("Failures:\n"); |
| 205 | for (int i = 0; i < failures.count(); i++) { |
| 206 | SkDebugf(" %s\n", failures[i].c_str()); |
| 207 | } |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 208 | SkDebugf("%d failures.\n", failures.count()); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 209 | } |
| 210 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 211 | template <typename T, typename Registry> |
| 212 | static void append_matching_factories(Registry* head, SkTDArray<typename Registry::Factory>* out) { |
| 213 | for (const Registry* reg = head; reg != NULL; reg = reg->next()) { |
| 214 | SkAutoTDelete<T> forName(reg->factory()(NULL)); |
| 215 | if (!SkCommandLineFlags::ShouldSkip(FLAGS_match, forName->getName())) { |
| 216 | *out->append() = reg->factory(); |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | |
commit-bot@chromium.org | 846872f | 2013-10-16 18:21:03 +0000 | [diff] [blame] | 221 | int tool_main(int argc, char** argv); |
| 222 | int tool_main(int argc, char** argv) { |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 223 | SkAutoGraphics ag; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 224 | SkCommandLineFlags::Parse(argc, argv); |
commit-bot@chromium.org | a65e2fd | 2014-05-30 17:23:31 +0000 | [diff] [blame] | 225 | |
| 226 | if (FLAGS_dryRun) { |
| 227 | FLAGS_verbose = true; |
| 228 | } |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 229 | #if SK_ENABLE_INST_COUNT |
| 230 | gPrintInstCount = FLAGS_leaks; |
| 231 | #endif |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 232 | GM::SetResourcePath(FLAGS_resources[0]); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 233 | SkBenchmark::SetResourcePath(FLAGS_resources[0]); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 234 | Test::SetResourcePath(FLAGS_resources[0]); |
| 235 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 236 | SkTArray<SkString> configs; |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 237 | for (int i = 0; i < FLAGS_config.count(); i++) { |
| 238 | SkStrSplit(FLAGS_config[i], ", ", &configs); |
| 239 | } |
| 240 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 241 | SkTDArray<GMRegistry::Factory> gms; |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 242 | SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations)); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 243 | if (FLAGS_gms) { |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 244 | append_matching_factories<GM>(GMRegistry::Head(), &gms); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 245 | |
| 246 | if (FLAGS_expectations.count() > 0) { |
| 247 | const char* path = FLAGS_expectations[0]; |
| 248 | if (sk_isdir(path)) { |
| 249 | expectations.reset(SkNEW_ARGS(DM::WriteTask::Expectations, (path))); |
| 250 | } else { |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 251 | #ifdef SK_BUILD_JSON_WRITER |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 252 | expectations.reset(SkNEW_ARGS(DM::JsonExpectations, (path))); |
commit-bot@chromium.org | 120c999 | 2014-05-16 18:11:51 +0000 | [diff] [blame] | 253 | #endif |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 254 | } |
commit-bot@chromium.org | 99589af | 2013-12-10 14:53:16 +0000 | [diff] [blame] | 255 | } |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 256 | } |
| 257 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 258 | SkTDArray<BenchRegistry::Factory> benches; |
| 259 | if (FLAGS_benches) { |
| 260 | append_matching_factories<SkBenchmark>(BenchRegistry::Head(), &benches); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 261 | } |
| 262 | |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 263 | SkTDArray<TestRegistry::Factory> tests; |
| 264 | if (FLAGS_tests) { |
| 265 | append_matching_factories<Test>(TestRegistry::Head(), &tests); |
| 266 | } |
| 267 | |
| 268 | SkDebugf("(%d GMs, %d benches) x %d configs, %d tests\n", |
| 269 | gms.count(), benches.count(), configs.count(), tests.count()); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 270 | DM::Reporter reporter; |
commit-bot@chromium.org | ef57b7e | 2014-02-28 20:31:31 +0000 | [diff] [blame] | 271 | DM::TaskRunner tasks(FLAGS_threads, FLAGS_gpuThreads); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 272 | kick_off_gms(gms, configs, *expectations, &reporter, &tasks); |
commit-bot@chromium.org | 38aeb0f | 2014-02-26 23:01:57 +0000 | [diff] [blame] | 273 | kick_off_benches(benches, configs, &reporter, &tasks); |
commit-bot@chromium.org | 0dc5bd1 | 2014-02-26 16:31:22 +0000 | [diff] [blame] | 274 | kick_off_tests(tests, &reporter, &tasks); |
commit-bot@chromium.org | 90b5a2a | 2014-05-14 17:55:32 +0000 | [diff] [blame] | 275 | kick_off_skps(&reporter, &tasks); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 276 | tasks.wait(); |
| 277 | |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 278 | SkDebugf("\n"); |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 279 | |
commit-bot@chromium.org | 39e8d93 | 2014-05-29 20:14:48 +0000 | [diff] [blame] | 280 | SkTArray<SkString> failures; |
| 281 | reporter.getFailures(&failures); |
| 282 | report_failures(failures); |
| 283 | return failures.count() > 0; |
mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 284 | } |
commit-bot@chromium.org | 846872f | 2013-10-16 18:21:03 +0000 | [diff] [blame] | 285 | |
| 286 | #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 287 | int main(int argc, char** argv) { |
| 288 | return tool_main(argc, argv); |
| 289 | } |
| 290 | #endif |