Index: gm/gmmain.cpp |
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp |
index 1540960d8f5d483d35d7d3881a9b505d40e7e570..78d08f7fb3293b9f1fad9395d0aeb53d19de00de 100644 |
--- a/gm/gmmain.cpp |
+++ b/gm/gmmain.cpp |
@@ -869,6 +869,9 @@ public: |
const GmResultDigest &actualResultDigest, |
ErrorCombination errors, |
bool ignoreFailure) { |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
Json::Value jsonActualResults = actualResultDigest.asJsonTypeValuePair(); |
Json::Value *resultCollection = NULL; |
@@ -900,6 +903,7 @@ public: |
if (resultCollection) { |
(*resultCollection)[testName] = jsonActualResults; |
} |
+#endif |
} |
/** |
@@ -907,7 +911,11 @@ public: |
*/ |
void add_expected_results_to_json_summary(const char testName[], |
Expectations expectations) { |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
this->fJsonExpectedResults[testName] = expectations.asJsonValue(); |
+#endif |
} |
/** |
@@ -1267,13 +1275,16 @@ public: |
// If unset, we don't do comparisons. |
SkAutoTUnref<ExpectationsSource> fExpectationsSource; |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
// JSON summaries that we generate as we go (just for output). |
Json::Value fJsonExpectedResults; |
Json::Value fJsonActualResults_Failed; |
Json::Value fJsonActualResults_FailureIgnored; |
Json::Value fJsonActualResults_NoComparison; |
Json::Value fJsonActualResults_Succeeded; |
- |
+#endif |
}; // end of GMMain class definition |
#if SK_SUPPORT_GPU |
@@ -1473,7 +1484,11 @@ DEFINE_bool2(verbose, v, false, "Give more detail (e.g. list all GMs run, more i |
"each test)."); |
DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images, use checksum-" |
"based filenames, as rebaseline.py will use when downloading them from Google Storage"); |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
DEFINE_string(writeJsonSummaryPath, "", "Write a JSON-formatted result summary to this file."); |
+#endif |
DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); |
DEFINE_string2(writePicturePath, p, "", "Write .skp files into this directory."); |
DEFINE_int32(pdfJpegQuality, -1, "Encodes images in JPEG at quality level N, " |
@@ -2198,10 +2213,14 @@ static bool parse_flags_gmmain_paths(GMMain* gmmain) { |
gmmain->fExpectationsSource.reset(SkNEW_ARGS( |
IndividualImageExpectationsSource, (readPath))); |
} else { |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
if (FLAGS_verbose) { |
SkDebugf("reading expectations from JSON summary file %s\n", readPath); |
} |
gmmain->fExpectationsSource.reset(SkNEW_ARGS(JsonExpectationsSource, (readPath))); |
+#endif |
} |
} |
return true; |
@@ -2408,6 +2427,9 @@ int tool_main(int argc, char** argv) { |
} |
#endif |
+// FIXME (scroggo): JSON is disabled in Android framework until we solve |
+// skbug.com/2448 |
+#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
if (FLAGS_writeJsonSummaryPath.count() == 1) { |
Json::Value root = CreateJsonTree( |
gmmain.fJsonExpectedResults, |
@@ -2417,6 +2439,7 @@ int tool_main(int argc, char** argv) { |
SkFILEWStream stream(FLAGS_writeJsonSummaryPath[0]); |
stream.write(jsonStdString.c_str(), jsonStdString.length()); |
} |
+#endif |
#if SK_SUPPORT_GPU |