aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-03-13 21:12:16 +0200
committerGitHub <noreply@github.com>2018-03-13 21:12:16 +0200
commitae0e469b0692862dae10ceb02799feb3f117ce26 (patch)
treed7de1e59b84965affc30ff8a7c22b44d8f23ba16 /run_unittests.py
parent552916d2d24723ef579ee54b18b8bd7b25328cf8 (diff)
parentdfc0655bcd6f00e2711331ddf582d1fa18223d70 (diff)
downloadmeson-ae0e469b0692862dae10ceb02799feb3f117ce26.zip
meson-ae0e469b0692862dae10ceb02799feb3f117ce26.tar.gz
meson-ae0e469b0692862dae10ceb02799feb3f117ce26.tar.bz2
Merge pull request #3145 from thejk/gcovr
Support gcovr >= 3.1 and add gcovr html report as fallback
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 9c7b16b..bb8ce46 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -2639,10 +2639,11 @@ class LinuxlikeTests(BasePlatformTests):
self.assertIn("-fsanitize=address", i["command"])
def test_coverage(self):
- if not shutil.which('gcovr'):
+ gcovr_exe, gcovr_new_rootdir = mesonbuild.environment.detect_gcovr()
+ if not gcovr_exe:
raise unittest.SkipTest('gcovr not found')
- if not shutil.which('genhtml'):
- raise unittest.SkipTest('genhtml not found')
+ if not shutil.which('genhtml') and not gcovr_new_rootdir:
+ raise unittest.SkipTest('genhtml not found and gcovr is too old')
if 'clang' in os.environ.get('CC', ''):
# We need to use llvm-cov instead of gcovr with clang
raise unittest.SkipTest('Coverage does not work with clang right now, help wanted!')