[yocto] [auh][PATCH 08/20] testimage.py: do not manipulate branches

Alexander Kanavin alexander.kanavin at linux.intel.com
Thu Dec 14 08:35:48 PST 2017


From: Alexander Kanavin <alex.kanavin at gmail.com>

AUH simply creates a series of commits now, so we can create and
run testimage directly on the branch we're on.

Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
---
 modules/testimage.py | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/modules/testimage.py b/modules/testimage.py
index da5c433..23d38d4 100644
--- a/modules/testimage.py
+++ b/modules/testimage.py
@@ -75,33 +75,6 @@ class TestImage():
 
         return ' '.join(pkgs_out)
 
-    def prepare_branch(self, pkgs_ctx):
-        ok = False
-
-        try:
-            self.git.reset_hard()
-            self.git.checkout_branch("master")
-
-            try:
-                self.git.delete_branch("testimage")
-            except Error:
-                pass
-
-            self.git.create_branch("testimage")
-            for c in pkgs_ctx:
-                patch_file = os.path.join(c['workdir'], c['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:
-            self._log_error(" testimage: Failed to prepare branch.")
-
-        return ok
- 
     def _parse_ptest_log(self, log_file):
         ptest_results = {}
 
@@ -284,8 +257,6 @@ class TestImage():
 
                 self.pkgs_ctx.remove(pkg_ctx)
 
-                if not self.prepare_branch(self.pkgs_ctx):
-                    handled = False
         else:
             handled = False
 
@@ -296,9 +267,6 @@ class TestImage():
             I(" Testimage was enabled but any upgrade was successful.")
             return
 
-        if not self.prepare_branch(self.pkgs_ctx):
-           return
-
         I(" Images will test for %s." % ', '.join(self.opts['machines']))
         for machine in self.opts['machines']:
             I("  Testing images for %s ..." % machine)
-- 
2.15.0




More information about the yocto mailing list