Index: tests/skia_test.cpp |
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp |
index fd7f3a356b3367f32c6f12d43ee73dfa1f1f2cda..587a3151887b72a32d9dd9bc5dfdafa22a532b8f 100644 |
--- a/tests/skia_test.cpp |
+++ b/tests/skia_test.cpp |
@@ -35,6 +35,8 @@ DEFINE_bool2(extendedTest, x, false, "run extended tests for pathOps."); |
DEFINE_bool2(leaks, l, false, "show leaked ref cnt'd objects."); |
DEFINE_bool2(single, z, false, "run tests on a single thread internally."); |
DEFINE_bool2(verbose, v, false, "enable verbose output."); |
+DEFINE_bool(skip_cpu, false, "skip CPU tests."); |
mtklein
2014/01/27 22:35:29
Would somewhat prefer to keep the flags positively
djsollen
2014/01/28 14:21:02
I'm a fan of this as well.
On 2014/01/27 22:35:29
borenet
2014/01/28 18:42:09
Done.
|
+DEFINE_bool(skip_gpu, false, "skip GPU tests."); |
DEFINE_int32(threads, SkThreadPool::kThreadPerCore, |
"Run threadsafe tests on a threadpool with this many threads."); |
@@ -174,6 +176,10 @@ int tool_main(int argc, char** argv) { |
if(!SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) { |
toRun++; |
+ } else if (test->isGPUTest() && !FLAGS_skip_gpu){ |
mtklein
2014/01/27 22:35:29
I think this is going to double-count?
Shouldn't
borenet
2014/01/28 18:42:09
Moved to its own function for clarity.
|
+ toRun++; |
+ } else if (!test->isGPUTest() && !FLAGS_skip_cpu) { |
+ toRun++; |
} |
total++; |
} |
@@ -191,6 +197,10 @@ int tool_main(int argc, char** argv) { |
SkAutoTDelete<Test> test(iter.next(&reporter)); |
if (SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) { |
++skipCount; |
+ } else if (test->isGPUTest() && FLAGS_skip_gpu) { |
mtklein
2014/01/27 22:35:29
Same deal down here.
|
+ ++skipCount; |
+ } else if (!test->isGPUTest() && FLAGS_skip_cpu) { |
+ ++skipCount; |
} else if (!test->isThreadsafe()) { |
unsafeTests.push_back() = test.detach(); |
} else { |