Skip to contentSkip to conversation

oeqa/selftest: clear SANITY_TESTED_DISTROS instead of failing

PATCH New Babanpreet Singh 1 participant 1 message Nov 14

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/selftest: clear SANITY_TESTED_DISTROS instead of failing

oe-selftest refuses to run when SANITY_TESTED_DISTROS is set, and poky.conf sets it:

Please unset SANITY_TESTED_DISTROS in order to run oe-selftest

Clear it in the test build directory with :forcevariable, so a value set through an override goes too, and drop the check.

[YOCTO #11933]

---

Notes:

    https://lore.kernel.org/openembedded-core/[email protected]/
 meta/lib/oeqa/selftest/context.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
meta/lib/oeqa/selftest/context.py +3 -4
index c9eb481725..e042eb1a78 100644
@@ -141,6 +141,9 @@ class OESelftestTestContext(OETestContext):
         # Set SSTATE_DIR to match the parent SSTATE_DIR
         subprocess.check_output("echo 'SSTATE_DIR ?= \"%s\"' >> %s/conf/local.conf" % (sstatedir, newbuilddir), cwd=newbuilddir, shell=True)
 
+        # Clear SANITY_TESTED_DISTROS however it was set
+        subprocess.check_output("echo 'SANITY_TESTED_DISTROS:forcevariable = \"\"' >> %s/conf/local.conf" % newbuilddir, cwd=newbuilddir, shell=True)
+
         os.chdir(newbuilddir)
 
         def patch_test(t):
@@ -349,10 +352,6 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
             self.tc.logger.error("Please unset PRSERV_HOST in order to run oe-selftest")
             raise OEQAPreRun
 
-        if "SANITY_TESTED_DISTROS" in self.tc.td:
-            self.tc.logger.error("Please unset SANITY_TESTED_DISTROS in order to run oe-selftest")
-            raise OEQAPreRun
-
         _add_layer_libs()
 
         self.tc.logger.info("Checking base configuration is valid/parsable")
Signature · 1 line
2.43.0