]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/concurrencytest: Improve builddir path manipulations
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Sep 2020 08:59:54 +0000 (09:59 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Sep 2020 15:43:35 +0000 (16:43 +0100)
Its possible some patterns may cause problems with the current path
manipulations, make a small tweak to try and avoid potential pathname
overlap issues.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/context.py

index 23f7d71bdbc5dad2c1d15da26b6afc2b9e9855b3..dd3609c1d6f4b9555a0a21e99a322f90b9748e17 100644 (file)
@@ -82,7 +82,9 @@ class OESelftestTestContext(OETestContext):
         oe.path.copytree(selftestdir, newselftestdir)
 
         for e in os.environ:
-            if builddir + "/" in os.environ[e] or os.environ[e].endswith(builddir):
+            if builddir + "/" in os.environ[e]:
+                os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/")
+            if 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)