aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/testimage.py6
-rw-r--r--modules/utils/git.py3
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/testimage.py b/modules/testimage.py
index 2d9ae60..da5c433 100644
--- a/modules/testimage.py
+++ b/modules/testimage.py
@@ -90,7 +90,11 @@ class TestImage():
self.git.create_branch("testimage")
for c in pkgs_ctx:
patch_file = os.path.join(c['workdir'], c['patch_file'])
- self.git.apply_patch(patch_file)
+ try:
+ self.git.apply_patch(patch_file)
+ except Exception as e:
+ c['integration_error'] = e
+ self.git.abort_patch()
ok = True
except Exception as e:
diff --git a/modules/utils/git.py b/modules/utils/git.py
index d7f5713..d1fe41b 100644
--- a/modules/utils/git.py
+++ b/modules/utils/git.py
@@ -64,6 +64,9 @@ class Git(object):
def apply_patch(self, patch_file):
return self._cmd("am %s" % patch_file)
+ def abort_patch(self):
+ return self._cmd("am --abort")
+
def status(self):
return self._cmd("status --porcelain")