[elbe-devel] [PATCH 09/11] projectmanager: Create en-coverage in new projects if coverage is enabled

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


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

diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 096b136e..696fc064 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -82,10 +82,12 @@ class ProjectManager(object):
     def stop(self):
         self.worker.stop()
 
-    def new_project(self, userid):
+    def new_project(self, userid, en_coverage=False):
         subdir = str(uuid4())
         builddir = path.join(self.basepath, subdir)
         self.db.create_project(builddir, owner_id=userid)
+        if en_coverage and path.exists(builddir):
+            os.mknod(path.join(builddir, "en-coverage"))
         return builddir
 
     def create_project(
-- 
2.28.0



More information about the elbe-devel mailing list