Commit 7b95d521 authored by U. Artie Eoff's avatar U. Artie Eoff Committed by Chad Versace

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: default avatarChad Versace <chad.versace@intel.com>
parent f7bb43f3
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment