diff options
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index f7171260e7..bcb6a878c7 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -1,13 +1,15 @@ +# # Copyright (C) 2013 Intel Corporation # -# Released under the MIT license (see COPYING.MIT) +# SPDX-License-Identifier: MIT +# # Main unittest module used by testimage.bbclass # This provides the oeRuntimeTest base class which is inherited by all tests in meta/lib/oeqa/runtime. # It also has some helper functions and it's responsible for actually starting the tests -import os, re, mmap, sys +import os, re, sys import unittest import inspect import subprocess @@ -26,7 +28,7 @@ try: import oeqa.sdkext except ImportError: pass -from oeqa.utils.decorators import LogResults, gettag, getResults +from oeqa.utils.decorators import LogResults, gettag logger = logging.getLogger("BitBake") @@ -55,7 +57,6 @@ def filterByTagExp(testsuite, tagexp): @LogResults class oeTest(unittest.TestCase): - pscmd = "ps" longMessage = True @classmethod @@ -108,20 +109,6 @@ class oeRuntimeTest(oeTest): def tearDown(self): # Uninstall packages in the DUT self.tc.install_uninstall_packages(self.id(), False) - - res = getResults() - # If a test fails or there is an exception dump - # for QemuTarget only - if (type(self.target).__name__ == "QemuTarget" and - (self.id() in res.getErrorList() or - self.id() in res.getFailList())): - self.tc.host_dumper.create_dir(self._testMethodName) - self.tc.host_dumper.dump_host() - self.target.target_dumper.dump_target( - self.tc.host_dumper.dump_dir) - print ("%s dump data stored in %s" % (self._testMethodName, - self.tc.host_dumper.dump_dir)) - self.tearDownLocal() # Method to be run after tearDown and implemented by child classes @@ -254,7 +241,7 @@ class TestContext(object): modules = [] for test in self.testslist: - if re.search("\w+\.\w+\.test_\S+", test): + if re.search(r"\w+\.\w+\.test_\S+", test): test = '.'.join(t.split('.')[:3]) module = pkgutil.get_loader(test) modules.append(module) @@ -396,11 +383,6 @@ class RuntimeTestContext(TestContext): def _get_test_suites_required(self): return [t for t in self.d.getVar("TEST_SUITES").split() if t != "auto"] - def loadTests(self): - super(RuntimeTestContext, self).loadTests() - if oeTest.hasPackage("procps"): - oeRuntimeTest.pscmd = "ps -ef" - def extract_packages(self): """ Find packages that will be needed during runtime. |