Don't write .pdfs in DM on the bots.

They take a long time to upload, and we don't do anything with them.

BUG=skia:6821

Change-Id: I16c5fc423953fa3e9d0dcb184ecbbe23f3918357
Reviewed-on: https://skia-review.googlesource.com/26142
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 290f4eb..94ac7f4 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -93,6 +93,8 @@
 
 DEFINE_bool(ignoreSigInt, false, "ignore SIGINT signals during test execution");
 
+DEFINE_string(dont_write, "", "File extensions to skip writing to --writePath.");  // See skia:6821
+
 using namespace DM;
 using sk_gpu_test::GrContextFactory;
 using sk_gpu_test::GLTestContext;
@@ -1124,11 +1126,13 @@
 
                 if (!FLAGS_writePath.isEmpty()) {
                     const char* ext = task.sink->fileExtension();
-                    if (data->getLength()) {
-                        WriteToDisk(task, md5, ext, data, data->getLength(), nullptr);
-                        SkASSERT(bitmap.drawsNothing());
-                    } else if (!bitmap.drawsNothing()) {
-                        WriteToDisk(task, md5, ext, nullptr, 0, &bitmap);
+                    if (!FLAGS_dont_write.contains(ext)) {
+                        if (data->getLength()) {
+                            WriteToDisk(task, md5, ext, data, data->getLength(), nullptr);
+                            SkASSERT(bitmap.drawsNothing());
+                        } else if (!bitmap.drawsNothing()) {
+                            WriteToDisk(task, md5, ext, nullptr, 0, &bitmap);
+                        }
                     }
                 }
             });