From dfc0655bcd6f00e2711331ddf582d1fa18223d70 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 13 Mar 2018 08:31:50 +0100 Subject: [PATCH] fixup! Fix coverage-xml and coverage-text targets for gcovr >= 3.1 Fix fail cases of detect_gcovr --- mesonbuild/environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 2bec46b4b..f34a11929 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -83,12 +83,13 @@ def detect_gcovr(version='3.1', log=False): p, found = Popen_safe([gcovr_exe, '--version'])[0:2] except (FileNotFoundError, PermissionError): # Doesn't exist in PATH or isn't executable - return + return None, None found = search_version(found) if p.returncode == 0: if log: mlog.log('Found gcovr-{} at {}'.format(found, shlex.quote(shutil.which(gcovr_exe)))) return gcovr_exe, mesonlib.version_compare(found, '>=' + version) + return None, None def find_coverage_tools(): gcovr_exe, gcovr_new_rootdir = detect_gcovr()