Update DM to respect blacklists for tests
authordjsollen <djsollen@google.com>
Fri, 12 Jun 2015 19:06:22 +0000 (12:06 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 12 Jun 2015 19:06:22 +0000 (12:06 -0700)
Review URL: https://codereview.chromium.org/1173363011

dm/DM.cpp

index 684ae80..af20a78 100644 (file)
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -674,9 +674,16 @@ static void run_test(skiatest::Test* test) {
         }
         bool verbose() const override { return FLAGS_veryVerbose; }
     } reporter;
+
+    SkString note;
+    SkString whyBlacklisted = is_blacklisted("_", "tests", "_", test->name);
+    if (!whyBlacklisted.isEmpty()) {
+        note.appendf(" (--blacklist %s)", whyBlacklisted.c_str());
+    }
+
     WallTimer timer;
     timer.start();
-    if (!FLAGS_dryRun) {
+    if (!FLAGS_dryRun && whyBlacklisted.isEmpty()) {
         start("unit", "test", "", test->name);
         GrContextFactory factory;
         if (FLAGS_pre_log) {
@@ -685,7 +692,7 @@ static void run_test(skiatest::Test* test) {
         test->proc(&reporter, &factory);
     }
     timer.end();
-    done(timer.fWall, "unit", "test", "", test->name, "", "");
+    done(timer.fWall, "unit", "test", "", test->name, note, "");
 }
 
 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/