aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/case.py
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2019-06-21 09:18:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-21 15:30:56 +0100
commitb0b79bf65f5e5e65958090a4a88622b42df896bf (patch)
treeb0d8455420a6ad18a7a710367323118f877bd214 /meta/lib/oeqa/core/case.py
parentde3b070fc2ddd0b63a324679ec5adbe30142fc22 (diff)
downloadopenembedded-core-contrib-b0b79bf65f5e5e65958090a4a88622b42df896bf.tar.gz
openembedded-core-contrib-b0b79bf65f5e5e65958090a4a88622b42df896bf.tar.bz2
openembedded-core-contrib-b0b79bf65f5e5e65958090a4a88622b42df896bf.zip
oeqa: avoid class setup method to run when skipping the whole class
For now, even if we have specified to skip the whole module/class via command line, e.g., `oe-selftest -R gotoolchain', the class setup method is still run. This at least results in unnecessary builds, and at worst results in ERROR, if the setup method fails. So improve the skipping mechanism to avoid class setup method to run when specified to skip. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core/case.py')
-rw-r--r--meta/lib/oeqa/core/case.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/case.py b/meta/lib/oeqa/core/case.py
index 54977c809f..aca144e9dc 100644
--- a/meta/lib/oeqa/core/case.py
+++ b/meta/lib/oeqa/core/case.py
@@ -32,6 +32,8 @@ class OETestCase(unittest.TestCase):
@classmethod
def _oeSetUpClass(clss):
_validate_td_vars(clss.td, clss.td_vars, "class")
+ if hasattr(clss, 'setUpHooker') and callable(getattr(clss, 'setUpHooker')):
+ clss.setUpHooker()
clss.setUpClassMethod()
@classmethod