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>
This commit is contained in:
parent
a9979d1583
commit
da6289c5f3
@ -15,6 +15,7 @@
|
||||
#include "SkString.h"
|
||||
|
||||
bool PathOpsDebug::gJson;
|
||||
bool PathOpsDebug::gMarkJsonFlaky;
|
||||
bool PathOpsDebug::gOutFirst;
|
||||
bool PathOpsDebug::gCheckForDuplicateNames;
|
||||
bool PathOpsDebug::gOutputSVG;
|
||||
|
@ -13,6 +13,7 @@
|
||||
class PathOpsDebug {
|
||||
public:
|
||||
static bool gJson;
|
||||
static bool gMarkJsonFlaky;
|
||||
static bool gOutFirst;
|
||||
static bool gCheckForDuplicateNames;
|
||||
static bool gOutputSVG;
|
||||
|
@ -443,6 +443,13 @@ static void appendTest(const char* pathStr, const char* pathPrefix, const char*
|
||||
#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 @@ static void json_status(ExpectSuccess expectSuccess, ExpectMatch expectMatch, bo
|
||||
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");
|
||||
|
@ -31,6 +31,7 @@ inline int comparePaths(skiatest::Reporter* reporter, const char* filename,
|
||||
}
|
||||
|
||||
extern bool drawAsciiPaths(const SkPath& one, const SkPath& two, bool drawPaths);
|
||||
extern void markTestFlakyForPathKit();
|
||||
extern void showOp(const SkPathOp op);
|
||||
extern bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
|
||||
const SkPathOp , const char* testName);
|
||||
|
@ -2213,6 +2213,7 @@ static void cubicOp87u(skiatest::Reporter* reporter, const char* filename) {
|
||||
pathB.moveTo(0,2);
|
||||
pathB.cubicTo(4,6, 1,0, 2,0);
|
||||
pathB.close();
|
||||
markTestFlakyForPathKit();
|
||||
testPathOp(reporter, path, pathB, kUnion_SkPathOp, filename);
|
||||
}
|
||||
|
||||
|
@ -2443,6 +2443,7 @@ static void testQuadratic7(skiatest::Reporter* reporter, const char* filename) {
|
||||
path.lineTo(0, 0);
|
||||
path.quadTo(3, 0, 1, 2);
|
||||
path.close();
|
||||
markTestFlakyForPathKit();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
@ -2730,6 +2731,7 @@ static void testQuadratic34(skiatest::Reporter* reporter, const char* filename)
|
||||
path.lineTo(1, 1);
|
||||
path.quadTo(2, 1, 1, 2);
|
||||
path.close();
|
||||
markTestFlakyForPathKit();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
@ -2992,6 +2994,7 @@ static void testQuadratic69(skiatest::Reporter* reporter, const char* filename)
|
||||
path.lineTo(1, 1);
|
||||
path.quadTo(3, 2, 2, 3);
|
||||
path.close();
|
||||
markTestFlakyForPathKit();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
@ -3580,6 +3583,7 @@ static void testQuadralateral2(skiatest::Reporter* reporter, const char* filenam
|
||||
path.lineTo(0, 1);
|
||||
path.lineTo(1, 2);
|
||||
path.close();
|
||||
markTestFlakyForPathKit();
|
||||
testSimplify(reporter, path, filename);
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,7 @@ int main(int argc, char** argv) {
|
||||
PathOpsDebug::gOut = fopen(FLAGS_json[0], "wb");
|
||||
fprintf(PathOpsDebug::gOut, "{\n");
|
||||
FLAGS_threads = 0;
|
||||
PathOpsDebug::gMarkJsonFlaky = false;
|
||||
}
|
||||
SetupCrashHandler();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user