aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsExtendedTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-18 18:47:37 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-18 18:47:37 +0000
commit16cfe40276bfb0a4d98c9ad995b8e5b134a49b19 (patch)
tree5cd7dcd8e011fcda54c746ac313c4d89db134f75 /tests/PathOpsExtendedTest.cpp
parent9d1cff124c14e550889a5755ffa5e6537af7c8c8 (diff)
allow tests to optionally use multiple threads
modify threaded path ops tests to check Background: this CL came out of a conversation with Eric where I learned that 10s of machines host 100s of bots. Since the bot hosting tests may be shared with many other tasks, it seems unwise for path ops to launch multiple test threads. The change here is to make launching multiple threads "opt-in" and by default, bots can run path ops in a single thread. Review URL: https://codereview.chromium.org/14002007 git-svn-id: http://skia.googlecode.com/svn/trunk@8750 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PathOpsExtendedTest.cpp')
-rw-r--r--tests/PathOpsExtendedTest.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index 9b27fce3e2..675918ffdf 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -43,12 +43,6 @@ static bool gComparePaths = true;
static bool gComparePathsAssert = true;
static bool gPathStrAssert = true;
-#if FORCE_RELEASE
-static bool gRunTestsInOneThread = true;
-#else
-static bool gRunTestsInOneThread = true;
-#endif
-
static void showPathContour(SkPath::Iter& iter) {
uint8_t verb;
SkPoint pts[4];
@@ -522,14 +516,14 @@ bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
const int maxThreadsAllocated = 64;
static int maxThreads = 1;
-int initializeTests(const char* test) {
+int initializeTests(skiatest::Reporter* reporter, const char* test) {
#ifdef SK_DEBUG
gDebugMaxWindSum = 4;
gDebugMaxWindValue = 4;
#endif
testName = test;
size_t testNameSize = strlen(test);
- if (!gRunTestsInOneThread) {
+ if (reporter->allowThreaded()) {
int threads = -1;
#ifdef SK_BUILD_FOR_MAC
size_t size = sizeof(threads);