aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2016-04-18 23:39:12 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-04-21 22:32:26 +0300
commitc95b0a6c1716b074b51b799c6af6265ddf069da2 (patch)
tree798fb2ae29859c1d4648910455f4be25a7042a8a /mesonbuild
parent35ef1d109a6a2ae0d8a285617c13e47e3e429d64 (diff)
downloadmeson-c95b0a6c1716b074b51b799c6af6265ddf069da2.zip
meson-c95b0a6c1716b074b51b799c6af6265ddf069da2.tar.gz
meson-c95b0a6c1716b074b51b799c6af6265ddf069da2.tar.bz2
Fix a bug in coverage reporting.
The directory from where the source files are sought when producing a coverage report in text or XML format should not be the build directory but the source directory instead.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/backend/ninjabackend.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 201b2d1..ac7cd92 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -431,12 +431,12 @@ int dummy;
if gcovr_exe:
added_rule = True
elem = NinjaBuildElement(self.all_outputs, 'coverage-xml', 'CUSTOM_COMMAND', '')
- elem.add_item('COMMAND', [gcovr_exe, '-x', '-r', self.environment.get_build_dir(),\
+ elem.add_item('COMMAND', [gcovr_exe, '-x', '-r', self.environment.get_source_dir(),\
'-o', os.path.join(self.environment.get_log_dir(), 'coverage.xml')])
elem.add_item('DESC', 'Generating XML coverage report.')
elem.write(outfile)
elem = NinjaBuildElement(self.all_outputs, 'coverage-text', 'CUSTOM_COMMAND', '')
- elem.add_item('COMMAND', [gcovr_exe, '-r', self.environment.get_build_dir(),\
+ elem.add_item('COMMAND', [gcovr_exe, '-r', self.environment.get_source_dir(),\
'-o', os.path.join(self.environment.get_log_dir(), 'coverage.txt')])
elem.add_item('DESC', 'Generating text coverage report.')
elem.write(outfile)