summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2017-02-09 13:15:14 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-15 09:29:56 -0800
commitb61eee699d16df609ff2ef203336764b1fcc241d (patch)
tree31b4d93e551584a6ce93af9a1378939e4fdb3d40
parentfd1ecec6a9cf88ae3c2996e16f4565167b156ed8 (diff)
downloadpoky-b61eee699d16df609ff2ef203336764b1fcc241d.tar.gz
testimage.bbclass: Add check for empty test suite
If for some reason (most likely incorrect TEST_SUITES var) you end with an empty test suite, testimage will start the target (qemu by default) and will run an empty suite, so better have a check before starting the target. [YOCTO #10979] (From OE-Core rev: 8345f834a080737f03bee3f0c615dd9654401d93) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/testimage.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 366c6f5d7b..09cc6d2a21 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -149,6 +149,7 @@ def testimage_main(d):
149 from oeqa.runtime.context import OERuntimeTestContext 149 from oeqa.runtime.context import OERuntimeTestContext
150 from oeqa.runtime.context import OERuntimeTestContextExecutor 150 from oeqa.runtime.context import OERuntimeTestContextExecutor
151 from oeqa.core.target.qemu import supported_fstypes 151 from oeqa.core.target.qemu import supported_fstypes
152 from oeqa.core.utils.test import getSuiteCases
152 from oeqa.utils import make_logger_bitbake_compatible 153 from oeqa.utils import make_logger_bitbake_compatible
153 154
154 def sigterm_exception(signum, stackframe): 155 def sigterm_exception(signum, stackframe):
@@ -250,6 +251,9 @@ def testimage_main(d):
250 test_modules = d.getVar('TEST_SUITES') 251 test_modules = d.getVar('TEST_SUITES')
251 tc.loadTests(test_paths, modules=test_modules) 252 tc.loadTests(test_paths, modules=test_modules)
252 253
254 if not getSuiteCases(tc.suites):
255 bb.fatal('Empty test suite, please verify TEST_SUITES variable')
256
253 package_extraction(d, tc.suites) 257 package_extraction(d, tc.suites)
254 258
255 bootparams = None 259 bootparams = None