]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest/context.py: check git command return values
authorMikko Rapeli <mikko.rapeli@linaro.org>
Thu, 14 Sep 2023 10:36:45 +0000 (13:36 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Sep 2023 20:56:52 +0000 (21:56 +0100)
Don't ignore return values from the git command lines. If something goes
wrong, fail the test right away.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/context.py

index bd03e765b03dbec0ab29eec7a5b5ed35e20b5da4..7dab5614a924179cf85a281c324a6c89c154ab6c 100644 (file)
@@ -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)