Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1040)

Unified Diff: dm/DMTestTask.h

Issue 694703005: When running DM, write test failures to json. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dm/DMTestTask.h
diff --git a/dm/DMTestTask.h b/dm/DMTestTask.h
index ceb0e12e968f6d251e7ce4f16a527eebf359dc55..709ed47b1abb489ef0271df74314586e659592b0 100644
--- a/dm/DMTestTask.h
+++ b/dm/DMTestTask.h
@@ -2,6 +2,7 @@
#define DMTestTask_DEFINED
#include "DMReporter.h"
+#include "DMJsonWriter.h"
#include "DMTask.h"
#include "DMTaskRunner.h"
#include "SkString.h"
@@ -21,8 +22,15 @@ private:
virtual bool allowExtendedTest() const SK_OVERRIDE;
virtual bool verbose() const SK_OVERRIDE;
- virtual void onReportFailed(const SkString& desc) SK_OVERRIDE {
- fFailure = desc;
+ virtual void onReportFailed(const skiatest::Failure& failure) SK_OVERRIDE {
+ JsonWriter::AddTestFailure(failure);
+
+ SkString newFailure;
+ skiatest::Failure::GetFailureString(&newFailure, failure);
+ if (!fFailure.isEmpty()) {
+ fFailure.append("\n\t\t");
+ }
+ fFailure.append(newFailure);
scroggo 2014/11/05 20:40:17 This change in behavior is orthogonal to the rest
mtklein 2014/11/06 15:24:05 Nope. This seems like a good change to me. Might
scroggo 2014/11/06 16:52:32 Yeah, I considered doing that, but I wasn't sure t
}
SkString fFailure;

Powered by Google App Engine
This is Rietveld 408576698