[elbe-devel] [PATCH 11/11] asyncworker: Use ElbeCoverage

Olivier Dion dion at linutronix.de
Mon Aug 17 18:20:20 CEST 2020


Enable coverage before execution of jobs if the target project has
coverage enabled.

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/asyncworker.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/elbepack/asyncworker.py b/elbepack/asyncworker.py
index b342de13..1a3156bb 100644
--- a/elbepack/asyncworker.py
+++ b/elbepack/asyncworker.py
@@ -18,6 +18,7 @@ from elbepack.rfs import DebootstrapException
 from elbepack.elbeproject import AptCacheCommitError, AptCacheUpdateError
 from elbepack.shellhelper import do
 from elbepack.log import elbe_logging, read_maxlevel, reset_level
+from elbepack.cov import ElbeCoverage
 
 # pylint: disable=ungrouped-imports
 try:
@@ -590,7 +591,9 @@ class AsyncWorker(Thread):
             if job is not None:
                 with savecwd():
                     with elbe_logging({"projects":job.project.builddir}):
-                        job.execute(self.db)
+                        with ElbeCoverage(coverage_path=job.project.builddir, en_coverage=job.project.en_coverage,
+                                          sources=["/var/cache/elbe/devel"], report=False):
+                            job.execute(self.db)
             else:
                 loop = False
             self.queue.task_done()
-- 
2.28.0



More information about the elbe-devel mailing list