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

Unified Diff: tests/skia_test.cpp

Issue 2441763003: formalize host debugging (Closed)
Patch Set: merge with ToT Created 4 years, 2 months 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 | « tests/PathOpsQuadIntersectionTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index 2b11e3ab50f37d51af3390577add64042c40381c..462735a71c91aa3fc25855dda0b2dffbf97e1b15 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -27,7 +27,11 @@
using namespace skiatest;
using namespace sk_gpu_test;
+DEFINE_bool2(dumpOp, d, false, "dump the pathOps to a file to recover mid-crash.");
DEFINE_bool2(extendedTest, x, false, "run extended tests for pathOps.");
+DEFINE_bool2(runFail, f, false, "check for success on tests known to fail.");
+DEFINE_bool2(verifyOp, y, false, "compare the pathOps result against a region.");
+
#if DEBUG_COIN
DEFINE_bool2(coinTest, c, false, "detect unused coincidence algorithms.");
#endif
@@ -133,6 +137,12 @@ static bool should_run(const char* testName, bool isGPUTest) {
int test_main();
int test_main() {
+#ifdef SK_DEBUG
+ SkPathOpsDebug::gDumpOp = FLAGS_dumpOp;
+ SkPathOpsDebug::gVerifyOp = FLAGS_verifyOp;
+#endif
+ SkPathOpsDebug::gRunFail = FLAGS_runFail;
+ SkPathOpsDebug::gVeryVerbose = FLAGS_veryVerbose;
SetupCrashHandler();
SkAutoGraphics ag;
@@ -153,6 +163,31 @@ int test_main() {
if (!resourcePath.isEmpty()) {
header.appendf(" --resourcePath %s", resourcePath.c_str());
}
+#if DEBUG_COIN
+ if (FLAGS_coinTest) {
+ header.appendf(" -c");
+ }
+#endif
+ if (FLAGS_dumpOp) {
+ header.appendf(" -d");
+ }
+#if SK_DEBUG
+ if (FLAGS_runFail) {
+ header.appendf(" -f");
+ }
+#endif
+ if (FLAGS_verbose) {
+ header.appendf(" -v");
+ }
+ if (FLAGS_veryVerbose) {
+ header.appendf(" -V");
+ }
+ if (FLAGS_extendedTest) {
+ header.appendf(" -x");
+ }
+ if (FLAGS_verifyOp) {
+ header.appendf(" -y");
+ }
#ifdef SK_DEBUG
header.append(" SK_DEBUG");
#else
« no previous file with comments | « tests/PathOpsQuadIntersectionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698