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

Side by Side Diff: dm/DM.cpp

Issue 856173002: DM: --tests -> --src tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "CrashHandler.h" 1 #include "CrashHandler.h"
2 #include "DMJsonWriter.h" 2 #include "DMJsonWriter.h"
3 #include "DMSrcSink.h" 3 #include "DMSrcSink.h"
4 #include "OverwriteLine.h" 4 #include "OverwriteLine.h"
5 #include "ProcStats.h" 5 #include "ProcStats.h"
6 #include "SkBBHFactory.h" 6 #include "SkBBHFactory.h"
7 #include "SkCommonFlags.h" 7 #include "SkCommonFlags.h"
8 #include "SkForceLinking.h" 8 #include "SkForceLinking.h"
9 #include "SkGraphics.h" 9 #include "SkGraphics.h"
10 #include "SkMD5.h" 10 #include "SkMD5.h"
11 #include "SkOSFile.h" 11 #include "SkOSFile.h"
12 #include "SkTaskGroup.h" 12 #include "SkTaskGroup.h"
13 #include "Test.h" 13 #include "Test.h"
14 #include "Timer.h" 14 #include "Timer.h"
15 15
16 DEFINE_bool(tests, true, "Run tests?");
17 DEFINE_string(images, "resources", "Images to decode."); 16 DEFINE_string(images, "resources", "Images to decode.");
18 DEFINE_string(src, "gm skp image", "Source types to test."); 17 DEFINE_string(src, "tests gm skp image", "Source types to test.");
19 DEFINE_bool(nameByHash, false, 18 DEFINE_bool(nameByHash, false,
20 "If true, write to FLAGS_writePath[0]/<hash>.png instead of " 19 "If true, write to FLAGS_writePath[0]/<hash>.png instead of "
21 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png"); 20 "to FLAGS_writePath[0]/<config>/<sourceType>/<name>.png");
22 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests."); 21 DEFINE_bool2(pathOpsExtended, x, false, "Run extended pathOps tests.");
23 DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1", 22 DEFINE_string(matrix, "1 0 0 0 1 0 0 0 1",
24 "Matrix to apply when using 'matrix' in config."); 23 "Matrix to apply when using 'matrix' in config.");
25 DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?"); 24 DEFINE_bool(gpu_threading, false, "Allow GPU work to run on multiple threads?");
26 25
27 DEFINE_string(blacklist, "", 26 DEFINE_string(blacklist, "",
28 "Space-separated config/src/name triples to blacklist. '_' matches anyt hing. E.g. \n" 27 "Space-separated config/src/name triples to blacklist. '_' matches anyt hing. E.g. \n"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 } 356 }
358 } 357 }
359 358
360 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 359 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
361 360
362 // Unit tests don't fit so well into the Src/Sink model, so we give them special treatment. 361 // Unit tests don't fit so well into the Src/Sink model, so we give them special treatment.
363 362
364 static SkTDArray<skiatest::Test> gCPUTests, gGPUTests; 363 static SkTDArray<skiatest::Test> gCPUTests, gGPUTests;
365 364
366 static void gather_tests() { 365 static void gather_tests() {
367 if (!FLAGS_tests) { 366 if (!FLAGS_src.contains("tests")) {
368 return; 367 return;
369 } 368 }
370 for (const skiatest::TestRegistry* r = skiatest::TestRegistry::Head(); r; 369 for (const skiatest::TestRegistry* r = skiatest::TestRegistry::Head(); r;
371 r = r->next()) { 370 r = r->next()) {
372 // Despite its name, factory() is returning a reference to 371 // Despite its name, factory() is returning a reference to
373 // link-time static const POD data. 372 // link-time static const POD data.
374 const skiatest::Test& test = r->factory(); 373 const skiatest::Test& test = r->factory();
375 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, test.name)) { 374 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, test.name)) {
376 continue; 375 continue;
377 } 376 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 471 }
473 return 0; 472 return 0;
474 } 473 }
475 474
476 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 475 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
477 int main(int argc, char** argv) { 476 int main(int argc, char** argv) {
478 SkCommandLineFlags::Parse(argc, argv); 477 SkCommandLineFlags::Parse(argc, argv);
479 return dm_main(); 478 return dm_main();
480 } 479 }
481 #endif 480 #endif
OLDNEW
« 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