[oe-commits] [openembedded-core] 30/37: oeqa/core/context: Include a _pre_run method
git at git.openembedded.org
git at git.openembedded.org
Fri May 26 21:00:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 4ff7ce0cc8594eb177e87a9ab6cbca344dd053f6
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
AuthorDate: Fri May 26 15:37:53 2017 -0500
oeqa/core/context: Include a _pre_run method
This pre runner will serve to allow Test components executes code
previously of the run a suite.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/core/context.py | 4 ++++
meta/lib/oeqa/core/exception.py | 3 +++
scripts/oe-test | 3 +++
3 files changed, 10 insertions(+)
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 6667f46..5f399fd 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -143,6 +143,9 @@ class OETestContextExecutor(object):
self.module_paths = args.CASES_PATHS
+ def _pre_run(self):
+ pass
+
def run(self, logger, args):
self._process_args(logger, args)
@@ -152,6 +155,7 @@ class OETestContextExecutor(object):
if args.list_tests:
rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['run'])
else:
+ self._pre_run()
rc = self.tc.runTests(**self.tc_kwargs['run'])
rc.logSummary(self.name)
rc.logDetails()
diff --git a/meta/lib/oeqa/core/exception.py b/meta/lib/oeqa/core/exception.py
index 97ef19d..a07961a 100644
--- a/meta/lib/oeqa/core/exception.py
+++ b/meta/lib/oeqa/core/exception.py
@@ -15,3 +15,6 @@ class OEQADependency(OEQAException):
class OEQAMissingManifest(OEQAException):
pass
+
+class OEQAPreRun(OEQAException):
+ pass
diff --git a/scripts/oe-test b/scripts/oe-test
index a1d282d..f90d85b 100755
--- a/scripts/oe-test
+++ b/scripts/oe-test
@@ -26,6 +26,7 @@ except ImportError:
pass
from oeqa.core.context import OETestContextExecutor
+from oeqa.core.exception import OEQAPreRun
logger = scriptutils.logger_create('oe-test')
@@ -92,6 +93,8 @@ def main():
ret = err.code
except argparse_oe.ArgumentUsageError as ae:
parser.error_subcommand(ae.message, ae.subcommand)
+ except OEQAPreRun as pr:
+ ret = 1
return ret
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list