Skip to contentSkip to conversation

ptest: add a test for orphaned ptests, and restore ones found by it

PATCH New Alexander Kanavin 1 participant 1 message May 7, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ptest: add a test for orphaned ptests, and restore ones found by it

Particularly, numactl, numpy and libseccomp are disabled for now due to failures or lack of qemu support. The rest have been verified to pass quickly.

---
 meta/classes/ptest.bbclass                    | 11 ++++
 .../distro/include/ptest-packagelists.inc     | 50 +++++++++++++++----
 2 files changed, 50 insertions(+), 11 deletions(-)
meta/classes/ptest.bbclass +11 -0
index 47611edea2..a270bf4cc5 100644
@@ -20,6 +20,8 @@ RRECOMMENDS_${PN}-ptest += "ptest-runner"
 
 PACKAGES =+ "${@bb.utils.contains('PTEST_ENABLED', '1', '${PN}-ptest', '', d)}"
 
+require conf/distro/include/ptest-packagelists.inc
+
 do_configure_ptest() {
     :
 }
@@ -116,4 +118,13 @@ python () {
     if not(d.getVar('PTEST_ENABLED') == "1"):
         for i in ['do_configure_ptest_base', 'do_compile_ptest_base', 'do_install_ptest_base']:
             bb.build.deltask(i, d)
+
+    # This checks that ptest package is actually included
+    # in standard oe-core ptest images - only for oe-core recipes
+    if not 'meta/recipes' in d.getVar('FILE') or not(d.getVar('PTEST_ENABLED') == "1"):
+        return
+
+    enabled_ptests = " ".join([d.getVar('PTESTS_FAST'),d.getVar('PTESTS_SLOW'), d.getVar('PTESTS_PROBLEMS')]).split()
+    if d.getVar('PN') + "-ptest" not in enabled_ptests:
+         bb.error("Recipe %s supports ptests but is not included in oe-core's conf/distro/include/ptest-packagelists.inc" % d.getVar("PN"))
 }
meta/conf/distro/include/ptest-packagelists.inc +39 -11

82 lines not on this page · raw message

Signature · 1 line
2.31.1