[elbe-devel] [PATCH 05/11] initvmaction: Set coverage option on project creation

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


Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/initvmaction.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 348c82b3..51e9b668 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -247,8 +247,14 @@ def submit_and_dl_result(xmlfile, cdrom, opt):
         with PreprocessWrapper(xmlfile, opt) as ppw:
             xmlfile = ppw.preproc
 
-            ret, prjdir, err = command_out_stderr(
-                '%s control create_project' % (elbe_exe))
+            opts = []
+
+            if "ELBE_COVERAGE" in os.environ:
+                opts.append("--coverage")
+
+            ret, prjdir, err = command_out_stderr('%s control %s create_project' %
+                                                  (elbe_exe, ' '.join(opts)))
+
             if ret != 0:
                 print("elbe control create_project failed.", file=sys.stderr)
                 print(err, file=sys.stderr)
-- 
2.28.0



More information about the elbe-devel mailing list