Browse Source

oe-selftest: check for coverage version before starting tests

python coverage versions lower than 4.x have problems with some distros. Adding the 4.x version as requirement to continue with coverage tracking.

[YOCTO #10207]

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Humberto Ibarra 7 years ago
parent
commit
a378b81750
1 changed files with 4 additions and 0 deletions
  1. 4 0
      scripts/oe-selftest

+ 4 - 0
scripts/oe-selftest

@@ -605,6 +605,10 @@ def buildResultClass(args):
                 if self.coverage_installed:
                     log.info("Coverage is enabled")
 
+                    major_version = int(coverage.version.__version__[0])
+                    if major_version < 4:
+                        log.error("python coverage %s installed. Require version 4 or greater." % coverage.version.__version__)
+                        self.stop()
                     # In case the user has not set the variable COVERAGE_PROCESS_START,
                     # create a default one and export it. The COVERAGE_PROCESS_START
                     # value indicates where the coverage configuration file resides