From 4352398caf518da858f0b4bdf053747efcf3a6a1 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 3 Apr 2016 17:27:14 +0300 Subject: [PATCH] Fix output dir of coverage-html. --- mesonbuild/backend/ninjabackend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index ef40c4ef4..00b711d2b 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -184,9 +184,8 @@ int dummy; self.generate_tests(outfile) outfile.write('# Install rules\n\n') self.generate_install(outfile) - if 'b_coverage' in self.environment.coredata.base_options and\ + if 'b_coverage' in self.environment.coredata.base_options and \ self.environment.coredata.base_options['b_coverage'].value: - print(bool(self.environment.coredata.base_options.get('b_coverage', False))) outfile.write('# Coverage rules\n\n') self.generate_coverage_rules(outfile) outfile.write('# Suffix\n\n') @@ -448,10 +447,11 @@ int dummy; phony_elem.write(outfile) elem = NinjaBuildElement(self.all_outputs, 'coveragereport/index.html', 'CUSTOM_COMMAND', '') + htmloutdir = os.path.join(self.environment.get_log_dir(), 'coveragereport') command = [lcov_exe, '--directory', self.environment.get_build_dir(),\ '--capture', '--output-file', 'coverage.info', '--no-checksum',\ '&&', genhtml_exe, '--prefix', self.environment.get_build_dir(),\ - '--output-directory', self.environment.get_log_dir(), '--title', 'Code coverage',\ + '--output-directory', htmloutdir, '--title', 'Code coverage',\ '--legend', '--show-details', 'coverage.info'] elem.add_item('COMMAND', command) elem.add_item('DESC', 'Generating HTML coverage report.')