mirror of
git://git.yoctoproject.org/poky
synced 2026-07-19 21:14:53 +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 commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1. Revert "oeqa/core/tests: Add tests of OEQA Threaded mode" This reverts commit a4eef558c9933eb32413b61ff80a11b999951b40. Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode" This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7. (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
|