From: Mikko Rapeli Date: Thu, 14 Sep 2023 10:36:45 +0000 (+0300) Subject: oeqa/selftest/context.py: check git command return values X-Git-Tag: yocto-5.2~5181 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dfc178a70d6fa60e89d4716f05d68e2c72c6ecd3;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest/context.py: check git command return values Don't ignore return values from the git command lines. If something goes wrong, fail the test right away. Signed-off-by: Mikko Rapeli Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py index bd03e765b03..7dab5614a92 100644 --- a/meta/lib/oeqa/selftest/context.py +++ b/meta/lib/oeqa/selftest/context.py @@ -104,7 +104,7 @@ 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) + 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)