diff mbox series

[3/3] oeqa/selftest/context.py: check git command return values

Message ID 20230914103645.1725054-3-mikko.rapeli@linaro.org
State Accepted, archived
Commit dfc178a70d6fa60e89d4716f05d68e2c72c6ecd3
Headers show
Series [1/3] openssh: capture logs in run-ptest | expand

Commit Message

Mikko Rapeli Sept. 14, 2023, 10:36 a.m. UTC
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>
---
 meta/lib/oeqa/selftest/context.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index bd03e765b0..7dab5614a9 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)