Skip to contentSkip to conversation

oeqa/selftest: Ensure buildtools in environment variables isn't replaced

PATCH New Richard Purdie 1 participant 1 message Mar 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa/selftest: Ensure buildtools in environment variables isn't replaced

This avoids the seeing broken replacements like:
oe-selftest-centos/build/build-st-926tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt which understandably break builds.

---
 meta/lib/oeqa/selftest/context.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/context.py +1 -1
index 409698d57ce..48ec5d419c7 100644
@@ -46,7 +46,7 @@ class OESelftestTestContext(OETestContext):
         oe.path.copytree(selftestdir, newselftestdir)
 
         for e in os.environ:
-            if builddir in os.environ[e]:
+            if builddir + "/" in os.environ[e] or os.environ[e].endswith(builddir):
                 os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
 
         subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True)
Signature · 1 line
2.25.0