]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest: Ensure buildtools in environment variables isn't replaced
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 10 Mar 2020 13:02:07 +0000 (13:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2020 09:24:50 +0000 (10:24 +0100)
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.

(From OE-Core rev: 04ee0e8b95cd8ed890374e0007f976684206b630)

(Cherry-picked from f930e2cadb9ee69759720b6c49aeeb6dd43a7edd but adjusted for thud)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/utils/concurrencytest.py

index 0f7b3dcc11373258d502e6678f0cd75ea6cac0f2..e6b14da89d13231741f13af15a0e6096b3d92ad9 100644 (file)
@@ -261,7 +261,7 @@ def fork_for_tests(concurrency_num, suite):
                     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)