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.

(From OE-Core rev: dfc178a70d6fa60e89d4716f05d68e2c72c6ecd3)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Mikko Rapeli
2023-09-14 13:36:45 +03:00
committed by Richard Purdie
parent bd1fc66e4c
commit de863bc1fa

View 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)