aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2018-10-08 10:05:36 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-11 00:21:47 +0200
commit50b2ef7354b503ae62abd504cdce938c390b358f (patch)
tree5619ee23e1f69db5630bc9055f882fbb19a96c9a /mesonbuild/environment.py
parent59774702b2a09eed289a9b9df89b9b716d27f6c1 (diff)
downloadmeson-50b2ef7354b503ae62abd504cdce938c390b358f.zip
meson-50b2ef7354b503ae62abd504cdce938c390b358f.tar.gz
meson-50b2ef7354b503ae62abd504cdce938c390b358f.tar.bz2
Consider 'samu' when looking for ninja command
samu prints a different message when the build is a no-op, so make assertBuildIsNoop consider that as well. Also, if compile_commands.json cannot be found, just skip the test. This seems reasonable since meson just produces a warning if `ninja -t compdb` fails. Finally, only capture stdout in run_meson_command_tests.py, since the backend may print messages the tests don't recognize to stderr. Fixes #3405.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 2a6f750..80917ed 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -120,7 +120,7 @@ def find_coverage_tools():
return gcovr_exe, gcovr_new_rootdir, lcov_exe, genhtml_exe
def detect_ninja(version='1.5', log=False):
- for n in ['ninja', 'ninja-build']:
+ for n in ['ninja', 'ninja-build', 'samu']:
try:
p, found = Popen_safe([n, '--version'])[0:2]
except (FileNotFoundError, PermissionError):