add --dryRun flag to dm
BUG=2294
R=mtklein@google.com
Author: humper@google.com
Review URL: https://codereview.chromium.org/305963007
git-svn-id: http://skia.googlecode.com/svn/trunk@14999 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/dm/DM.cpp b/dm/DM.cpp
index f71a614..9ddba24 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -51,6 +51,7 @@
"it is skipped unless some list entry starts with ~");
DEFINE_string(config, "565 8888 gpu nonrendering",
"Options: 565 8888 gpu nonrendering msaa4 msaa16 nvprmsaa4 nvprmsaa16 gpunull gpudebug angle mesa");
+DEFINE_bool(dryRun, false, "Just print the tests that would be run, without actually running them.");
DEFINE_bool(leaks, false, "Print leaked instance-counted objects at exit?");
DEFINE_string(skps, "", "Directory to read skps from.");
@@ -58,6 +59,8 @@
DEFINE_bool(benches, true, "Run benches? Does not run GMs-as-benches.");
DEFINE_bool(tests, true, "Run tests?");
+DECLARE_bool(verbose);
+
__SK_FORCE_IMAGE_DECODER_LINKING;
// "FooBar" -> "foobar". Obviously, ASCII only.
@@ -208,6 +211,10 @@
int tool_main(int argc, char** argv) {
SkAutoGraphics ag;
SkCommandLineFlags::Parse(argc, argv);
+
+ if (FLAGS_dryRun) {
+ FLAGS_verbose = true;
+ }
#if SK_ENABLE_INST_COUNT
gPrintInstCount = FLAGS_leaks;
#endif