]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: check for coverage version before starting tests
authorHumberto Ibarra <humberto.ibarra.lopez@intel.com>
Mon, 12 Sep 2016 20:30:50 +0000 (15:30 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Sep 2016 11:14:40 +0000 (12:14 +0100)
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>
scripts/oe-selftest

index 72bf4dda6a5c8bb2a8a2b58d8924ee735cc7f185..d9ffd40e8c4caa734cd490d77304cc600cc75b73 100755 (executable)
@@ -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