diff options
author | Michael Forney <mforney@mforney.org> | 2018-10-08 10:05:36 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-11-11 00:21:47 +0200 |
commit | 50b2ef7354b503ae62abd504cdce938c390b358f (patch) | |
tree | 5619ee23e1f69db5630bc9055f882fbb19a96c9a /run_meson_command_tests.py | |
parent | 59774702b2a09eed289a9b9df89b9b716d27f6c1 (diff) | |
download | meson-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 'run_meson_command_tests.py')
-rwxr-xr-x | run_meson_command_tests.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/run_meson_command_tests.py b/run_meson_command_tests.py index 390868a..17fe969 100755 --- a/run_meson_command_tests.py +++ b/run_meson_command_tests.py @@ -63,15 +63,14 @@ class CommandTests(unittest.TestCase): def _run(self, command, workdir=None): ''' - Run a command while printing the stdout and stderr to stdout, - and also return a copy of it + Run a command while printing the stdout, and also return a copy of it ''' # If this call hangs CI will just abort. It is very hard to distinguish # between CI issue and test bug in that case. Set timeout and fail loud # instead. p = subprocess.run(command, stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, env=os.environ.copy(), - universal_newlines=True, cwd=workdir, timeout=60 * 5) + env=os.environ.copy(), universal_newlines=True, + cwd=workdir, timeout=60 * 5) print(p.stdout) if p.returncode != 0: raise subprocess.CalledProcessError(p.returncode, command) |