summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2011-02-12 12:07:06 -0800
committerChad Versace <chad.versace@intel.com>2011-02-17 08:08:42 -0800
commit7b95d521bea9cb4f81e1d7b014fb14ef43864af6 (patch)
tree718817b9ed417d05a9ef6219676b80d501a1cb11 /framework
parentf7bb43f3a9c8bb5dbe40908c5b924f5f51bd7d06 (diff)
Move gpu tests to main thread and cpu-only tests to threadpool.
This is an intermediate change that moves the "base" (or gpu) tests to the main thread and the other (cpu-only) tests to the ConcurrentTestPool threads. This restores ctrl-c behavior for gpu tests. Reviewed-by: Chad Versace <chad.versace@intel.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/core.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/framework/core.py b/framework/core.py
index ce388aa86..8f33b9134 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -33,7 +33,7 @@ import time
import traceback
from log import log
from cStringIO import StringIO
-from threads import ThreadPools
+from threads import ConcurrentTestPool
import threading
__all__ = [
@@ -297,9 +297,10 @@ class Test:
raise NotImplementedError
def doRun(self, env, path):
- if ThreadPools().lookup(self.poolName) is None:
- ThreadPools().create(self.poolName)
- ThreadPools().put(self.__doRunWork, args = (env, path,), name = self.poolName)
+ if "base" == self.poolName:
+ self.__doRunWork(env, path)
+ else:
+ ConcurrentTestPool().put(self.__doRunWork, args = (env, path,))
def __doRunWork(self, env, path):
# Exclude tests that don't match the filter regexp
@@ -386,7 +387,7 @@ class TestProfile:
def run(self, env):
time_start = time.time()
self.tests.doRun(env, '')
- ThreadPools().joinAll()
+ ConcurrentTestPool().join()
time_end = time.time()
env.file.write("time:", time_end-time_start, "\n")