diff options
Diffstat (limited to 'poky/meta/classes/testimage.bbclass')
-rw-r--r-- | poky/meta/classes/testimage.bbclass | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/poky/meta/classes/testimage.bbclass b/poky/meta/classes/testimage.bbclass index 77291c22c..9feb26770 100644 --- a/poky/meta/classes/testimage.bbclass +++ b/poky/meta/classes/testimage.bbclass @@ -117,13 +117,6 @@ testimage_dump_host () { } python do_testimage() { - - testimage_sanity(d) - - if (d.getVar('IMAGE_PKGTYPE') == 'rpm' - and 'dnf' in d.getVar('TEST_SUITES')): - create_rpm_index(d) - testimage_main(d) } @@ -159,6 +152,12 @@ def testimage_main(d): """ raise RuntimeError + testimage_sanity(d) + + if (d.getVar('IMAGE_PKGTYPE') == 'rpm' + and ('dnf' in d.getVar('TEST_SUITES') or 'auto' in d.getVar('TEST_SUITES'))): + create_rpm_index(d) + logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) pn = d.getVar("PN") @@ -260,10 +259,16 @@ def testimage_main(d): # Load tests before starting the target test_paths = get_runtime_paths(d) test_modules = d.getVar('TEST_SUITES').split() + if not test_modules: + bb.fatal('Empty test suite, please verify TEST_SUITES variable') + tc.loadTests(test_paths, modules=test_modules) - if not getSuiteCases(tc.suites): + suitecases = getSuiteCases(tc.suites) + if not suitecases: bb.fatal('Empty test suite, please verify TEST_SUITES variable') + else: + bb.debug(2, 'test suites:\n\t%s' % '\n\t'.join([str(c) for c in suitecases])) package_extraction(d, tc.suites) |