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]

(From OE-Core rev: a378b817504986173c4b0984a28aead247589b3f)

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Humberto Ibarra 2016-09-12 15:30:50 -05:00 committed by Richard Purdie
parent 405262dbb1
commit b28e6d6039
1 changed files with 4 additions and 0 deletions

View File

@ -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