summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-07 16:29:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-17 12:51:24 +0100
commita4ced5e15755113f7d229090ab4b40061bdfe17e (patch)
tree2a05e2e6b654778e49ff4a6e6f4cd39bcab60e8c /meta/lib/oeqa/selftest
parent98905dd827f1e9c9a3e355827f347385dc81cad7 (diff)
downloadpoky-a4ced5e15755113f7d229090ab4b40061bdfe17e.tar.gz
selftest/signing: Ensure build path relocation is safe
Similarly to 04ee0e8b95cd8ed890374e0007f976684206b630, ensure only full build paths are replaced in the environment to avoid breaking buildtools. (From OE-Core rev: 3be3740d0239f2eb198ccd2b75597cdccbdd1efc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit fcd0a9683af1a9155eabbd9056e3b46d4a931b2e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/cases/signing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/signing.py b/meta/lib/oeqa/selftest/cases/signing.py
index 202d54994b..a28c7eb19a 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -44,7 +44,9 @@ class Signing(OESelftestTestCase):
44 origenv = os.environ.copy() 44 origenv = os.environ.copy()
45 45
46 for e in os.environ: 46 for e in os.environ:
47 if builddir in os.environ[e]: 47 if builddir + "/" in os.environ[e]:
48 os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/")
49 if os.environ[e].endswith(builddir):
48 os.environ[e] = os.environ[e].replace(builddir, newbuilddir) 50 os.environ[e] = os.environ[e].replace(builddir, newbuilddir)
49 51
50 os.chdir(newbuilddir) 52 os.chdir(newbuilddir)