mirror of
git://git.yoctoproject.org/poky
synced 2026-10-27 12:25:34 +00:00
We have several options for parallel processing in oeqa, parallel execution of modules, threading and mulitple processes for the runners. After much experimentation is appears the most scalable and least invasive approach is multiple processes using concurrenttestsuite from testtools. This means we can drop the current threading code which is only used by the sdk test execution. oeqa/decorator/depends: Remove threading code Revert "oeqa/sdk: Enable usage of OEQA thread mode" This reverts commitadc434c063. Revert "oeqa/core/tests: Add tests of OEQA Threaded mode" This reverts commita4eef558c9. Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode" This reverts commitd3d4ba902d. (From OE-Core rev: a98ab5e560e73b6988512fbae5cefe9e42ceed53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
# Copyright (C) 2016 Intel Corporation
|
|
# Released under the MIT license (see COPYING.MIT)
|
|
|
|
import sys
|
|
import os
|
|
|
|
import unittest
|
|
import logging
|
|
import os
|
|
|
|
logger = logging.getLogger("oeqa")
|
|
logger.setLevel(logging.INFO)
|
|
consoleHandler = logging.StreamHandler()
|
|
formatter = logging.Formatter('OEQATest: %(message)s')
|
|
consoleHandler.setFormatter(formatter)
|
|
logger.addHandler(consoleHandler)
|
|
|
|
def setup_sys_path():
|
|
directory = os.path.dirname(os.path.abspath(__file__))
|
|
oeqa_lib = os.path.realpath(os.path.join(directory, '../../../'))
|
|
if not oeqa_lib in sys.path:
|
|
sys.path.insert(0, oeqa_lib)
|
|
|
|
class TestBase(unittest.TestCase):
|
|
def setUp(self):
|
|
self.logger = logger
|
|
directory = os.path.dirname(os.path.abspath(__file__))
|
|
self.cases_path = os.path.join(directory, 'cases')
|
|
|
|
def _testLoader(self, d={}, modules=[], tests=[], filters={}):
|
|
from oeqa.core.context import OETestContext
|
|
tc = OETestContext(d, self.logger)
|
|
tc.loadTests(self.cases_path, modules=modules, tests=tests,
|
|
filters=filters)
|
|
return tc
|