mark tests flaky for pathkit

retain flaky state to avoid manual edits

R=kjlubick@google.com

Bug: skia:
Change-Id: I2f30a90aed46c52a0b30af1ccb7d6235b6db6945
Reviewed-on: https://skia-review.googlesource.com/149800
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index 0fa41c4..857ba63 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -443,6 +443,13 @@
 #endif
 }
 
+void markTestFlakyForPathKit() {
+    if (PathOpsDebug::gJson) {
+        SkASSERT(!PathOpsDebug::gMarkJsonFlaky);
+        PathOpsDebug::gMarkJsonFlaky = true;
+    }
+}
+
 SK_DECLARE_STATIC_MUTEX(simplifyDebugOut);
 
 bool testSimplify(SkPath& path, bool useXor, SkPath& out, PathOpsThreadState& state,
@@ -481,6 +488,10 @@
     fprintf(PathOpsDebug::gOut, "  \"expectSuccess\": \"%s\",\n",
             ExpectSuccess::kNo == expectSuccess ? "no" :
             ExpectSuccess::kYes == expectSuccess ? "yes" : "flaky");
+    if (PathOpsDebug::gMarkJsonFlaky) {
+        expectMatch = ExpectMatch::kFlaky;
+        PathOpsDebug::gMarkJsonFlaky = false;
+    }
     fprintf(PathOpsDebug::gOut, "  \"expectMatch\": \"%s\",\n",
             ExpectMatch::kNo == expectMatch ? "no" :
             ExpectMatch::kYes == expectMatch ? "yes" : "flaky");