diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2023-03-27 15:59:36 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-04-14 06:30:29 -1000 |
commit | ee5fc31a7490cae999ec4ccc21367eb95f714261 (patch) | |
tree | 411a1108ef43b69953707601ddadcf4f7d52ed77 /meta | |
parent | ab086e9bd683326ac9c129964dff787b74d1fd57 (diff) | |
download | poky-ee5fc31a7490cae999ec4ccc21367eb95f714261.tar.gz |
oeqs/selftest: OESelftestTestContext: replace the os.environ after subprocess.check_output
No function change but is needed to simplify the next patch.
(From OE-Core rev: 273cc6d6a11c4f11f80830f23489a287f38c1a17)
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 193d8f0d6383f54c61f90d58eeb8f41580c2360a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/context.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index 78c7a467e2..0d26a07438 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -86,17 +86,17 @@ class OESelftestTestContext(OETestContext): | |||
86 | oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") | 86 | oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") |
87 | oe.path.copytree(selftestdir, newselftestdir) | 87 | oe.path.copytree(selftestdir, newselftestdir) |
88 | 88 | ||
89 | subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) | ||
90 | |||
91 | # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow | ||
92 | subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) | ||
93 | |||
89 | for e in os.environ: | 94 | for e in os.environ: |
90 | if builddir + "/" in os.environ[e]: | 95 | if builddir + "/" in os.environ[e]: |
91 | os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") | 96 | os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") |
92 | if os.environ[e].endswith(builddir): | 97 | if os.environ[e].endswith(builddir): |
93 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) | 98 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) |
94 | 99 | ||
95 | subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) | ||
96 | |||
97 | # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow | ||
98 | subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) | ||
99 | |||
100 | os.chdir(newbuilddir) | 100 | os.chdir(newbuilddir) |
101 | 101 | ||
102 | def patch_test(t): | 102 | def patch_test(t): |