diff options
author | Jose Quaresma <quaresma.jose@gmail.com> | 2023-03-27 15:59:36 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-28 22:28:45 +0100 |
commit | 4147b7e76d184cb309315e512637da502e665dba (patch) | |
tree | f805e8a119185d5e7f79ad02e7b4d9fc0bc68c56 /meta/lib | |
parent | 22286ed02d2913c2ea70d374e8930dcd511052b7 (diff) | |
download | poky-4147b7e76d184cb309315e512637da502e665dba.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: 193d8f0d6383f54c61f90d58eeb8f41580c2360a)
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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 ab13131f29..adfb1170db 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py | |||
@@ -97,17 +97,17 @@ class OESelftestTestContext(OETestContext): | |||
97 | oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") | 97 | oe.path.copytree(builddir + "/cache", newbuilddir + "/cache") |
98 | oe.path.copytree(selftestdir, newselftestdir) | 98 | oe.path.copytree(selftestdir, newselftestdir) |
99 | 99 | ||
100 | subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) | ||
101 | |||
102 | # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow | ||
103 | subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) | ||
104 | |||
100 | for e in os.environ: | 105 | for e in os.environ: |
101 | if builddir + "/" in os.environ[e]: | 106 | if builddir + "/" in os.environ[e]: |
102 | os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") | 107 | os.environ[e] = os.environ[e].replace(builddir + "/", newbuilddir + "/") |
103 | if os.environ[e].endswith(builddir): | 108 | if os.environ[e].endswith(builddir): |
104 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) | 109 | os.environ[e] = os.environ[e].replace(builddir, newbuilddir) |
105 | 110 | ||
106 | subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True) | ||
107 | |||
108 | # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow | ||
109 | subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True) | ||
110 | |||
111 | os.chdir(newbuilddir) | 111 | os.chdir(newbuilddir) |
112 | 112 | ||
113 | def patch_test(t): | 113 | def patch_test(t): |