autorun_post: use absolute paths for lcov
Ubuntu LTS 16.04 has lcov 1.12 which is bugged: when using relative paths for -a and -o lcov parameters command the result is "error: cannot write / read file X". Using absolute paths solves this issue. Change-Id: If73a62335b75381ce944969723cfdca84aaff7bf Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/403679 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5c36200d90
commit
7f3e956c73
@ -11,7 +11,7 @@ import re
|
||||
def generateCoverageReport(output_dir, repo_dir):
|
||||
with open(os.path.join(output_dir, 'coverage.log'), 'w+') as log_file:
|
||||
coveragePath = os.path.join(output_dir, '**', 'cov_total.info')
|
||||
covfiles = glob.glob(coveragePath, recursive=True)
|
||||
covfiles = [os.path.abspath(p) for p in glob.glob(coveragePath, recursive=True)]
|
||||
for f in covfiles:
|
||||
print(f, file=log_file)
|
||||
if len(covfiles) == 0:
|
||||
@ -24,7 +24,7 @@ def generateCoverageReport(output_dir, repo_dir):
|
||||
'--rc genhtml_legend=1',
|
||||
'--rc geninfo_all_blocks=1',
|
||||
]
|
||||
cov_total = os.path.join(output_dir, 'cov_total.info')
|
||||
cov_total = os.path.abspath(os.path.join(output_dir, 'cov_total.info'))
|
||||
coverage = os.path.join(output_dir, 'coverage')
|
||||
lcov = 'lcov' + ' ' + ' '.join(lcov_opts) + ' -q -a ' + ' -a '.join(covfiles) + ' -o ' + cov_total
|
||||
genhtml = 'genhtml' + ' ' + ' '.join(lcov_opts) + ' -q ' + cov_total + ' --legend' + ' -t "Combined" --show-details -o ' + coverage
|
||||
|
Loading…
Reference in New Issue
Block a user