summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/core/context.py4
-rw-r--r--meta/lib/oeqa/core/exception.py3
-rwxr-xr-xscripts/oe-test3
3 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 6667f46f1e..5f399fdfcc 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -143,6 +143,9 @@ class OETestContextExecutor(object):
143 143
144 self.module_paths = args.CASES_PATHS 144 self.module_paths = args.CASES_PATHS
145 145
146 def _pre_run(self):
147 pass
148
146 def run(self, logger, args): 149 def run(self, logger, args):
147 self._process_args(logger, args) 150 self._process_args(logger, args)
148 151
@@ -152,6 +155,7 @@ class OETestContextExecutor(object):
152 if args.list_tests: 155 if args.list_tests:
153 rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['run']) 156 rc = self.tc.listTests(args.list_tests, **self.tc_kwargs['run'])
154 else: 157 else:
158 self._pre_run()
155 rc = self.tc.runTests(**self.tc_kwargs['run']) 159 rc = self.tc.runTests(**self.tc_kwargs['run'])
156 rc.logSummary(self.name) 160 rc.logSummary(self.name)
157 rc.logDetails() 161 rc.logDetails()
diff --git a/meta/lib/oeqa/core/exception.py b/meta/lib/oeqa/core/exception.py
index 97ef19dd77..a07961adc3 100644
--- a/meta/lib/oeqa/core/exception.py
+++ b/meta/lib/oeqa/core/exception.py
@@ -15,3 +15,6 @@ class OEQADependency(OEQAException):
15 15
16class OEQAMissingManifest(OEQAException): 16class OEQAMissingManifest(OEQAException):
17 pass 17 pass
18
19class OEQAPreRun(OEQAException):
20 pass
diff --git a/scripts/oe-test b/scripts/oe-test
index a1d282db33..f90d85b3da 100755
--- a/scripts/oe-test
+++ b/scripts/oe-test
@@ -26,6 +26,7 @@ except ImportError:
26 pass 26 pass
27 27
28from oeqa.core.context import OETestContextExecutor 28from oeqa.core.context import OETestContextExecutor
29from oeqa.core.exception import OEQAPreRun
29 30
30logger = scriptutils.logger_create('oe-test') 31logger = scriptutils.logger_create('oe-test')
31 32
@@ -92,6 +93,8 @@ def main():
92 ret = err.code 93 ret = err.code
93 except argparse_oe.ArgumentUsageError as ae: 94 except argparse_oe.ArgumentUsageError as ae:
94 parser.error_subcommand(ae.message, ae.subcommand) 95 parser.error_subcommand(ae.message, ae.subcommand)
96 except OEQAPreRun as pr:
97 ret = 1
95 98
96 return ret 99 return ret
97 100