aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-06-04 14:15:33 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-04 14:15:33 -0700
commit821e10ed41394adbdcd989ea9b32b059042cf0e9 (patch)
treef60284be3c0fdddda391b66bad6afa25db11f9d0 /dm
parentad7ae6c821c530dd6cb54b0e8931ba8b10e8d87d (diff)
Add prelog flag to DM
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 62d5cfbf04..55563fef08 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -48,6 +48,7 @@ DEFINE_string(uninterestingHashesFile, "",
DEFINE_int32(shards, 1, "We're splitting source data into this many shards.");
DEFINE_int32(shard, 0, "Which shard do I run?");
+DEFINE_bool2(pre_log, p, false, "Log before running each test. May be incomprehensible when threading");
__SK_FORCE_IMAGE_DECODER_LINKING;
using namespace DM;
@@ -466,6 +467,9 @@ struct Task {
if (!FLAGS_dryRun && whyBlacklisted.isEmpty()) {
SkBitmap bitmap;
SkDynamicMemoryWStream stream;
+ if (FLAGS_pre_log) {
+ SkDebugf("\nRunning %s->%s", name.c_str(), task->sink.tag);
+ }
start(task->sink.tag, task->src.tag, task->src.options, name.c_str());
Error err = task->sink->draw(*task->src, &bitmap, &stream, &log);
if (!err.isEmpty()) {
@@ -657,6 +661,9 @@ static void run_test(skiatest::Test* test) {
if (!FLAGS_dryRun) {
start("unit", "test", "", test->name);
GrContextFactory factory;
+ if (FLAGS_pre_log) {
+ SkDebugf("\nRunning test %s", test->name);
+ }
test->proc(&reporter, &factory);
}
timer.end();