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

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: Use "" instead of NULL 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
« no previous file with comments | « dm/DMJsonWriter.cpp ('k') | tests/GrTRecorderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMTestTask.h
diff --git a/dm/DMTestTask.h b/dm/DMTestTask.h
index ceb0e12e968f6d251e7ce4f16a527eebf359dc55..9a47b35f602502c7c163b2b30b35ac132fa03553 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,16 @@ 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;
+ failure.getFailureString(&newFailure);
+ // TODO: Better to store an array of failures?
+ if (!fFailure.isEmpty()) {
+ fFailure.append("\n\t\t");
+ }
+ fFailure.append(newFailure);
}
SkString fFailure;
« no previous file with comments | « dm/DMJsonWriter.cpp ('k') | tests/GrTRecorderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698