summaryrefslogtreecommitdiff
path: root/test cases/unit
diff options
context:
space:
mode:
authorVolker Weißmann <volker.weissmann@gmx.de>2021-10-14 01:35:14 +0200
committerEli Schwartz <eschwartz93@gmail.com>2021-10-30 22:26:28 -0400
commit2c079d855ed87488bdcc6c5c06f59abdb9b85b6c (patch)
tree62206d581a9ff764d948da94d4478dba85bce765 /test cases/unit
parent3c103fe49ccca848d255b9b00365e74ce35400a4 (diff)
downloadmeson-2c079d855ed87488bdcc6c5c06f59abdb9b85b6c.tar.gz
Added warning if run_command is called without the check kwarg
Diffstat (limited to 'test cases/unit')
-rw-r--r--test cases/unit/11 cross prog/meson.build6
-rw-r--r--test cases/unit/24 compiler run_command/meson.build2
-rw-r--r--test cases/unit/47 native file binary/meson.build6
-rw-r--r--test cases/unit/59 introspect buildoptions/meson.build2
4 files changed, 8 insertions, 8 deletions
diff --git a/test cases/unit/11 cross prog/meson.build b/test cases/unit/11 cross prog/meson.build
index a7adeb284..192169a7d 100644
--- a/test cases/unit/11 cross prog/meson.build
+++ b/test cases/unit/11 cross prog/meson.build
@@ -4,9 +4,9 @@ native_exe = find_program('sometool.py', native : true)
cross_exe = find_program('sometool.py')
cross_other_exe = find_program('someothertool.py')
-native_out = run_command(native_exe).stdout().strip()
-cross_out = run_command(cross_exe).stdout().strip()
-cross_other_out = run_command(cross_other_exe).stdout().strip()
+native_out = run_command(native_exe, check: true).stdout().strip()
+cross_out = run_command(cross_exe, check: true).stdout().strip()
+cross_other_out = run_command(cross_other_exe, check: true).stdout().strip()
assert(native_out == 'native',
'Native output incorrect:' + native_out)
diff --git a/test cases/unit/24 compiler run_command/meson.build b/test cases/unit/24 compiler run_command/meson.build
index 6d9e0b969..e99b8809c 100644
--- a/test cases/unit/24 compiler run_command/meson.build
+++ b/test cases/unit/24 compiler run_command/meson.build
@@ -4,7 +4,7 @@ cc = meson.get_compiler('c')
# This test only checks that the compiler object can be passed to
# run_command(). If the compiler has been launched, it is expected
# to output something either to stdout or to stderr.
-result = run_command(cc, '--version')
+result = run_command(cc, '--version', check: false)
if result.stdout() == '' and result.stderr() == ''
error('No output in stdout and stderr. Did the compiler run at all?')
endif
diff --git a/test cases/unit/47 native file binary/meson.build b/test cases/unit/47 native file binary/meson.build
index c9b6e5de4..2f55fe219 100644
--- a/test cases/unit/47 native file binary/meson.build
+++ b/test cases/unit/47 native file binary/meson.build
@@ -4,7 +4,7 @@ case = get_option('case')
if case == 'find_program'
prog = find_program('bash')
- result = run_command(prog, ['--version'])
+ result = run_command(prog, ['--version'], check: true)
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load bash from config file')
elif case == 'config_dep'
add_languages('cpp')
@@ -12,10 +12,10 @@ elif case == 'config_dep'
assert(dep.get_configtool_variable('version').endswith('12345'), 'Didn\'t load llvm from config file')
elif case == 'python3'
prog = import('python3').find_python()
- result = run_command(prog, ['--version'])
+ result = run_command(prog, ['--version'], check: true)
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python3 from config file')
elif case == 'python'
prog = import('python').find_installation()
- result = run_command(prog, ['--version'])
+ result = run_command(prog, ['--version'], check: true)
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python from config file')
endif
diff --git a/test cases/unit/59 introspect buildoptions/meson.build b/test cases/unit/59 introspect buildoptions/meson.build
index 9cfdc2c96..36e03e0cc 100644
--- a/test cases/unit/59 introspect buildoptions/meson.build
+++ b/test cases/unit/59 introspect buildoptions/meson.build
@@ -9,7 +9,7 @@ foo = false
executable(target_name, target_src, build_by_default : foo)
-r = run_command(find_program('c_compiler.py'))
+r = run_command(find_program('c_compiler.py'), check: false)
if r.returncode() != 0
error('FAILED')
endif