Index: dm/DM.cpp |
diff --git a/dm/DM.cpp b/dm/DM.cpp |
index b330445186444d7fd6d93292013ad1a7b2c85691..2be37942dd659e3e2145d5c7a229069ac7647a50 100644 |
--- a/dm/DM.cpp |
+++ b/dm/DM.cpp |
@@ -6,6 +6,7 @@ |
#include "SkCommonFlags.h" |
#include "SkForceLinking.h" |
#include "SkGraphics.h" |
+#include "SkOSFile.h" |
#include "SkPicture.h" |
#include "SkString.h" |
#include "SkTaskGroup.h" |
@@ -208,19 +209,17 @@ int dm_main() { |
GrGLStandard gpuAPI = get_gl_standard(); |
+ SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::Expectations)); |
+ if (FLAGS_expectations.count() > 0) { |
+ expectations.reset(DM::WriteTask::Expectations::Create(FLAGS_expectations[0])); |
+ if (!expectations.get()) { |
+ return 1; |
+ } |
+ } |
+ |
SkTDArray<GMRegistry::Factory> gms; |
- SkAutoTDelete<DM::Expectations> expectations(SkNEW(DM::NoExpectations)); |
if (FLAGS_gms) { |
append_matching_factories<GM>(GMRegistry::Head(), &gms); |
- |
- if (FLAGS_expectations.count() > 0) { |
- const char* path = FLAGS_expectations[0]; |
- if (sk_isdir(path)) { |
- expectations.reset(SkNEW_ARGS(DM::WriteTask::Expectations, (path))); |
- } else { |
- expectations.reset(SkNEW_ARGS(DM::JsonExpectations, (path))); |
- } |
- } |
} |
SkTDArray<TestRegistry::Factory> tests; |
@@ -241,6 +240,8 @@ int dm_main() { |
kick_off_skps(skps, &reporter, &tasks); |
tasks.wait(); |
+ DM::WriteTask::DumpJson(); |
+ |
SkDebugf("\n"); |
#ifdef SK_DEBUG |
if (FLAGS_portableFonts && FLAGS_reportUsedChars) { |