diff options
-rwxr-xr-x | scripts/oe-selftest | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index 375ba5c415..3d2dffb5c2 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest @@ -584,20 +584,20 @@ def buildResultClass(args): if self.coverage_installed: log.info("Coverage is enabled") - # 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 - # More info on https://pypi.python.org/pypi/coverage - if not os.environ.get('COVERAGE_PROCESS_START'): - os.environ['COVERAGE_PROCESS_START'] = coverage_setup(args.coverage_source, args.coverage_include, args.coverage_omit) - - # Use default site.USER_SITE and write corresponding config file - site.ENABLE_USER_SITE = True - if not os.path.exists(site.USER_SITE): - os.makedirs(site.USER_SITE) - self.coveragepth = os.path.join(site.USER_SITE, "coverage.pth") - with open(self.coveragepth, 'w') as cps: - cps.write('import sys,site; sys.path.extend(site.getsitepackages()); import coverage; coverage.process_startup();') + # 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 + # More info on https://pypi.python.org/pypi/coverage + if not os.environ.get('COVERAGE_PROCESS_START'): + os.environ['COVERAGE_PROCESS_START'] = coverage_setup(args.coverage_source, args.coverage_include, args.coverage_omit) + + # Use default site.USER_SITE and write corresponding config file + site.ENABLE_USER_SITE = True + if not os.path.exists(site.USER_SITE): + os.makedirs(site.USER_SITE) + self.coveragepth = os.path.join(site.USER_SITE, "coverage.pth") + with open(self.coveragepth, 'w') as cps: + cps.write('import sys,site; sys.path.extend(site.getsitepackages()); import coverage; coverage.process_startup();') def stopTestRun(self): """ Report coverage data after the testcases are run """ |