]> 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)
committerSteve Sakoman <steve@sakoman.com>
Mon, 14 Sep 2020 14:26:37 +0000 (04:26 -1000)
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>
(cherry picked from commit 889005dc17d3e3b8eadee907ee2c05b8ff613285)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/selftest/context.py

index 9baad583218ebc67e66b59c91f59fe8188ae341a..33557b124075d90287e094db676675b258545de5 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)