From: Richard Purdie Date: Tue, 8 Sep 2020 08:59:54 +0000 (+0100) Subject: oeqa/concurrencytest: Improve builddir path manipulations X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~10126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=889005dc17d3e3b8eadee907ee2c05b8ff613285;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/concurrencytest: Improve builddir path manipulations 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 --- diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 23f7d71bdbc..dd3609c1d6f 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -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)