]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqs/selftest: OESelftestTestContext: replace the os.environ after subprocess.check_o...
authorJose Quaresma <quaresma.jose@gmail.com>
Mon, 27 Mar 2023 15:59:36 +0000 (15:59 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Mar 2023 21:28:35 +0000 (22:28 +0100)
No function change but is needed to simplify the next patch.

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/oeqa/selftest/context.py

index ab13131f2971aaaf789296f6e1bf49fb569fb190..adfb1170db59515a2950b5e7148d87fed4f41d2a 100644 (file)
@@ -97,17 +97,17 @@ class OESelftestTestContext(OETestContext):
         oe.path.copytree(builddir + "/cache", newbuilddir + "/cache")
         oe.path.copytree(selftestdir, newselftestdir)
 
+        subprocess.check_output("git init; git add *; git commit -a -m 'initial'", cwd=newselftestdir, shell=True)
+
+        # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow
+        subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True)
+
         for e in os.environ:
             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)
-
-        # Tried to used bitbake-layers add/remove but it requires recipe parsing and hence is too slow
-        subprocess.check_output("sed %s/conf/bblayers.conf -i -e 's#%s#%s#g'" % (newbuilddir, selftestdir, newselftestdir), cwd=newbuilddir, shell=True)
-
         os.chdir(newbuilddir)
 
         def patch_test(t):