diff options
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
| -rw-r--r-- | meta/lib/oeqa/oetest.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index a7c7203201..e3bbc46905 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
| @@ -16,8 +16,7 @@ try: | |||
| 16 | except ImportError: | 16 | except ImportError: |
| 17 | pass | 17 | pass |
| 18 | import logging | 18 | import logging |
| 19 | from oeqa.utils.decorators import LogResults, gettag | 19 | from oeqa.utils.decorators import LogResults, gettag, getResults |
| 20 | from sys import exc_info, exc_clear | ||
| 21 | 20 | ||
| 22 | logger = logging.getLogger("BitBake") | 21 | logger = logging.getLogger("BitBake") |
| 23 | 22 | ||
| @@ -184,17 +183,18 @@ class oeRuntimeTest(oeTest): | |||
| 184 | pass | 183 | pass |
| 185 | 184 | ||
| 186 | def tearDown(self): | 185 | def tearDown(self): |
| 187 | # If a test fails or there is an exception | 186 | res = getResults() |
| 188 | if not exc_info() == (None, None, None): | 187 | # If a test fails or there is an exception dump |
| 189 | exc_clear() | 188 | # for QemuTarget only |
| 190 | #Only dump for QemuTarget | 189 | if (type(self.target).__name__ == "QemuTarget" and |
| 191 | if (type(self.target).__name__ == "QemuTarget"): | 190 | (self.id() in res.getErrorList() or |
| 192 | self.tc.host_dumper.create_dir(self._testMethodName) | 191 | self.id() in res.getFailList())): |
| 193 | self.tc.host_dumper.dump_host() | 192 | self.tc.host_dumper.create_dir(self._testMethodName) |
| 194 | self.target.target_dumper.dump_target( | 193 | self.tc.host_dumper.dump_host() |
| 195 | self.tc.host_dumper.dump_dir) | 194 | self.target.target_dumper.dump_target( |
| 196 | print ("%s dump data stored in %s" % (self._testMethodName, | 195 | self.tc.host_dumper.dump_dir) |
| 197 | self.tc.host_dumper.dump_dir)) | 196 | print ("%s dump data stored in %s" % (self._testMethodName, |
| 197 | self.tc.host_dumper.dump_dir)) | ||
| 198 | 198 | ||
| 199 | #TODO: use package_manager.py to install packages on any type of image | 199 | #TODO: use package_manager.py to install packages on any type of image |
| 200 | def install_packages(self, packagelist): | 200 | def install_packages(self, packagelist): |
