diff options
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r-- | meta/lib/oeqa/oetest.py | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 9c84466dd0..bcb6a878c7 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
@@ -28,7 +28,7 @@ try: | |||
28 | import oeqa.sdkext | 28 | import oeqa.sdkext |
29 | except ImportError: | 29 | except ImportError: |
30 | pass | 30 | pass |
31 | from oeqa.utils.decorators import LogResults, gettag, getResults | 31 | from oeqa.utils.decorators import LogResults, gettag |
32 | 32 | ||
33 | logger = logging.getLogger("BitBake") | 33 | logger = logging.getLogger("BitBake") |
34 | 34 | ||
@@ -57,7 +57,6 @@ def filterByTagExp(testsuite, tagexp): | |||
57 | @LogResults | 57 | @LogResults |
58 | class oeTest(unittest.TestCase): | 58 | class oeTest(unittest.TestCase): |
59 | 59 | ||
60 | pscmd = "ps" | ||
61 | longMessage = True | 60 | longMessage = True |
62 | 61 | ||
63 | @classmethod | 62 | @classmethod |
@@ -110,20 +109,6 @@ class oeRuntimeTest(oeTest): | |||
110 | def tearDown(self): | 109 | def tearDown(self): |
111 | # Uninstall packages in the DUT | 110 | # Uninstall packages in the DUT |
112 | self.tc.install_uninstall_packages(self.id(), False) | 111 | self.tc.install_uninstall_packages(self.id(), False) |
113 | |||
114 | res = getResults() | ||
115 | # If a test fails or there is an exception dump | ||
116 | # for QemuTarget only | ||
117 | if (type(self.target).__name__ == "QemuTarget" and | ||
118 | (self.id() in res.getErrorList() or | ||
119 | self.id() in res.getFailList())): | ||
120 | self.tc.host_dumper.create_dir(self._testMethodName) | ||
121 | self.tc.host_dumper.dump_host() | ||
122 | self.target.target_dumper.dump_target( | ||
123 | self.tc.host_dumper.dump_dir) | ||
124 | print ("%s dump data stored in %s" % (self._testMethodName, | ||
125 | self.tc.host_dumper.dump_dir)) | ||
126 | |||
127 | self.tearDownLocal() | 112 | self.tearDownLocal() |
128 | 113 | ||
129 | # Method to be run after tearDown and implemented by child classes | 114 | # Method to be run after tearDown and implemented by child classes |
@@ -256,7 +241,7 @@ class TestContext(object): | |||
256 | 241 | ||
257 | modules = [] | 242 | modules = [] |
258 | for test in self.testslist: | 243 | for test in self.testslist: |
259 | if re.search("\w+\.\w+\.test_\S+", test): | 244 | if re.search(r"\w+\.\w+\.test_\S+", test): |
260 | test = '.'.join(t.split('.')[:3]) | 245 | test = '.'.join(t.split('.')[:3]) |
261 | module = pkgutil.get_loader(test) | 246 | module = pkgutil.get_loader(test) |
262 | modules.append(module) | 247 | modules.append(module) |
@@ -398,11 +383,6 @@ class RuntimeTestContext(TestContext): | |||
398 | def _get_test_suites_required(self): | 383 | def _get_test_suites_required(self): |
399 | return [t for t in self.d.getVar("TEST_SUITES").split() if t != "auto"] | 384 | return [t for t in self.d.getVar("TEST_SUITES").split() if t != "auto"] |
400 | 385 | ||
401 | def loadTests(self): | ||
402 | super(RuntimeTestContext, self).loadTests() | ||
403 | if oeTest.hasPackage("procps"): | ||
404 | oeRuntimeTest.pscmd = "ps -ef" | ||
405 | |||
406 | def extract_packages(self): | 386 | def extract_packages(self): |
407 | """ | 387 | """ |
408 | Find packages that will be needed during runtime. | 388 | Find packages that will be needed during runtime. |