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

Unified Diff: tests/skia_test.cpp

Issue 148173010: Revert of Add --skip_cpu and --skip_gpu options to tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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/Test.h ('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 76bb3cc499586f47ae9f650f6019f970af890ac9..fd7f3a356b3367f32c6f12d43ee73dfa1f1f2cda 100644
--- a/tests/skia_test.cpp
+++ b/tests/skia_test.cpp
@@ -35,8 +35,6 @@
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(cpu, true, "whether or not to run CPU tests.");
-DEFINE_bool(gpu, true, "whether or not to run GPU tests.");
DEFINE_int32(threads, SkThreadPool::kThreadPerCore,
"Run threadsafe tests on a threadpool with this many threads.");
@@ -126,19 +124,6 @@
int32_t* fFailCount;
};
-static bool should_run(const char* testName, bool isGPUTest) {
- if (SkCommandLineFlags::ShouldSkip(FLAGS_match, testName)) {
- return false;
- }
- if (!FLAGS_cpu && !isGPUTest) {
- return false;
- }
- if (!FLAGS_gpu && isGPUTest) {
- return false;
- }
- return true;
-}
-
int tool_main(int argc, char** argv);
int tool_main(int argc, char** argv) {
SkCommandLineFlags::SetUsage("");
@@ -186,7 +171,8 @@
Iter iter;
while ((test = iter.next(NULL/*reporter not needed*/)) != NULL) {
SkAutoTDelete<Test> owned(test);
- if (should_run(test->getName(), test->isGPUTest())) {
+
+ if(!SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) {
toRun++;
}
total++;
@@ -203,9 +189,9 @@
DebugfReporter reporter(toRun);
for (int i = 0; i < total; i++) {
SkAutoTDelete<Test> test(iter.next(&reporter));
- if (!should_run(test->getName(), test->isGPUTest())) {
+ if (SkCommandLineFlags::ShouldSkip(FLAGS_match, test->getName())) {
++skipCount;
- } else if (!test->isGPUTest()) {
+ } else if (!test->isThreadsafe()) {
unsafeTests.push_back() = test.detach();
} else {
threadpool.add(SkNEW_ARGS(SkTestRunnable, (test.detach(), &failCount)));
« no previous file with comments | « tests/Test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698