summaryrefslogtreecommitdiff
path: root/test cases
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
parent3c103fe49ccca848d255b9b00365e74ce35400a4 (diff)
downloadmeson-2c079d855ed87488bdcc6c5c06f59abdb9b85b6c.tar.gz
Added warning if run_command is called without the check kwarg
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/139 mesonintrospect from scripts/meson.build2
-rw-r--r--test cases/common/14 configure file/meson.build14
-rw-r--r--test cases/common/14 configure file/subdir/meson.build6
-rw-r--r--test cases/common/156 config tool variable/meson.build4
-rw-r--r--test cases/common/179 escape and unicode/meson.build2
-rw-r--r--test cases/common/220 fs module/meson.build2
-rw-r--r--test cases/common/227 very long commmand line/meson.build2
-rw-r--r--test cases/common/33 run program/meson.build20
-rw-r--r--test cases/common/44 pkgconfig-gen/meson.build2
-rw-r--r--test cases/common/48 file grabber/meson.build4
-rw-r--r--test cases/common/48 file grabber/subdir/meson.build2
-rw-r--r--test cases/common/97 find program path/meson.build4
-rw-r--r--test cases/failing/80 override exe config/meson.build2
-rw-r--r--test cases/fortran/15 include/meson.build4
-rw-r--r--test cases/frameworks/10 gtk-doc/meson.build2
-rw-r--r--test cases/frameworks/11 gir subproject/meson.build2
-rw-r--r--test cases/frameworks/7 gnome/meson.build4
-rw-r--r--test cases/linuxlike/13 cmake dependency/meson.build2
-rw-r--r--test cases/linuxlike/15 ld binary/meson.build2
-rw-r--r--test cases/rust/12 bindgen/meson.build2
-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
24 files changed, 50 insertions, 50 deletions
diff --git a/test cases/common/139 mesonintrospect from scripts/meson.build b/test cases/common/139 mesonintrospect from scripts/meson.build
index 11176727d..a83b533e2 100644
--- a/test cases/common/139 mesonintrospect from scripts/meson.build
+++ b/test cases/common/139 mesonintrospect from scripts/meson.build
@@ -2,7 +2,7 @@ project('mesonintrospect from scripts', 'c')
python = import('python3').find_python()
-ret = run_command(python, ['check_env.py', '1'])
+ret = run_command(python, ['check_env.py', '1'], check: false)
if ret.returncode() == 0
find_program(ret.stdout())
else
diff --git a/test cases/common/14 configure file/meson.build b/test cases/common/14 configure file/meson.build
index f7e0eeba6..8fdca210d 100644
--- a/test cases/common/14 configure file/meson.build
+++ b/test cases/common/14 configure file/meson.build
@@ -40,7 +40,7 @@ outf = configure_file(input : 'dummy.dat',
output : 'config2.h',
command : [genprog, scriptfile, ifile, ofile],
install_dir : 'share/appdir')
-ret = run_command(check_file, outf)
+ret = run_command(check_file, outf, check: false)
if ret.returncode() != 0
error('Error running command: @0@\n@1@'.format(ret.stdout(), ret.stderr()))
endif
@@ -53,7 +53,7 @@ outf = configure_file(
output : 'config2b.h',
command : [genprog, genscript2b, ofile2b],
install_dir : 'share/appdir')
-ret = run_command(check_file, outf)
+ret = run_command(check_file, outf, check: false)
if ret.returncode() != 0
error('Error running command: @0@\n@1@'.format(ret.stdout(), ret.stderr()))
endif
@@ -64,7 +64,7 @@ outf = configure_file(
output : 'config2deps.h',
depfile : 'depfile.d',
command : [genprog, genscript2deps, ofile2deps, '@DEPFILE@'])
-ret = run_command(check_file, outf)
+ret = run_command(check_file, outf, check: false)
if ret.returncode() != 0
error('Error running command: @0@\n@1@'.format(ret.stdout(), ret.stderr()))
endif
@@ -116,7 +116,7 @@ basename_py = find_program('basename.py')
file_contains_py = find_program('file_contains.py')
test_string = 'hello world'
test_input_file = join_paths(meson.current_build_dir(), test_string)
-run_command(find_program('touch.py'), test_input_file)
+run_command(find_program('touch.py'), test_input_file, check: true)
configs = [
# no input
configure_file(command: [ basename_py, test_string ], capture: true, output: 'capture test 1'),
@@ -182,13 +182,13 @@ inf = 'invalid-utf8.bin.in'
outf = configure_file(input : inf,
output : 'invalid-utf8.bin',
copy: true)
-ret = run_command(check_file, inf, outf)
+ret = run_command(check_file, inf, outf, check: false)
if ret.returncode() != 0
error('Error running command: @0@\n@1@'.format(ret.stdout(), ret.stderr()))
endif
# Now the same, but using a File object as an argument.
inf2 = files('invalid-utf8.bin.in')[0]
-ret = run_command(check_file, inf2, outf)
+ret = run_command(check_file, inf2, outf, check: false)
if ret.returncode() != 0
error('Error running command: @0@\n@1@'.format(ret.stdout(), ret.stderr()))
endif
@@ -197,7 +197,7 @@ endif
outf = configure_file(input : inf,
output : 'somebinary.bin',
copy : true)
-ret = run_command(check_file, inf, outf)
+ret = run_command(check_file, inf, outf, check: false)
if ret.returncode() != 0
error('Error running command: @0@\n@1@'.format(ret.stdout(), ret.stderr()))
endif
diff --git a/test cases/common/14 configure file/subdir/meson.build b/test cases/common/14 configure file/subdir/meson.build
index 146b7b66c..98b672c05 100644
--- a/test cases/common/14 configure file/subdir/meson.build
+++ b/test cases/common/14 configure file/subdir/meson.build
@@ -3,20 +3,20 @@ configure_file(input : '../dummy.dat',
output : 'config2-1.h',
command : [genprog, scriptfile, ifile, 'config2-1.h'],
install_dir : 'share/appdireh')
-run_command(check_file, join_paths(meson.current_build_dir(), 'config2-1.h'))
+run_command(check_file, join_paths(meson.current_build_dir(), 'config2-1.h'), check: true)
# Configure in subdir with files() for input and relative for output
configure_file(input : '../dummy.dat',
output : 'config2-2.h',
command : [genprog, scriptfile, files('../dummy.dat'), 'config2-2.h'],
install_dir : 'share/appdirok')
-run_command(check_file, join_paths(meson.current_build_dir(), 'config2-2.h'))
+run_command(check_file, join_paths(meson.current_build_dir(), 'config2-2.h'), check: true)
# Configure in subdir with string templates for input and output
configure_file(input : '../dummy.dat',
output : 'config2-3.h',
command : [found_script, '@INPUT@', '@OUTPUT@'])
-run_command(check_file, join_paths(meson.current_build_dir(), 'config2-3.h'))
+run_command(check_file, join_paths(meson.current_build_dir(), 'config2-3.h'), check: true)
# Test that overwriting an existing file creates a warning.
configure_file(
diff --git a/test cases/common/156 config tool variable/meson.build b/test cases/common/156 config tool variable/meson.build
index 95841179c..fc8059413 100644
--- a/test cases/common/156 config tool variable/meson.build
+++ b/test cases/common/156 config tool variable/meson.build
@@ -23,9 +23,9 @@ endif
includedir = dep_llvm.get_configtool_variable('includedir')
includedir = join_paths(includedir, 'llvm')
if host_machine.system() == 'windows'
- cmd = run_command(['dir', includedir])
+ cmd = run_command(['dir', includedir], check: false)
else
- cmd = run_command(['ls', includedir])
+ cmd = run_command(['ls', includedir], check: false)
endif
assert(cmd.returncode() == 0, 'did not run successfully')
diff --git a/test cases/common/179 escape and unicode/meson.build b/test cases/common/179 escape and unicode/meson.build
index e4fe628ae..46c99d310 100644
--- a/test cases/common/179 escape and unicode/meson.build
+++ b/test cases/common/179 escape and unicode/meson.build
@@ -4,7 +4,7 @@ gen = generator(find_program('file.py'), arguments:['@INPUT@', 'erd\u0151', '@OU
gen_file = gen.process('file.c.in')
-find_file_list = run_command(find_program('find.py'))
+find_file_list = run_command(find_program('find.py'), check: true)
assert(find_file_list.returncode() == 0, 'Didn\'t find any files.')
# Strings should support both octal \ooo and hex \xhh encodings
diff --git a/test cases/common/220 fs module/meson.build b/test cases/common/220 fs module/meson.build
index 7d10eb5fa..d38c87232 100644
--- a/test cases/common/220 fs module/meson.build
+++ b/test cases/common/220 fs module/meson.build
@@ -15,7 +15,7 @@ if not is_windows and build_machine.system() != 'cygwin'
# * Windows user permissions to create symlinks, and/or Windows in Developer mode
# so at this time the symlink test is skipped for Windows.
symlink = meson.current_build_dir() / 'a_symlink'
- run_command('ln', '-s', meson.current_source_dir() / 'meson.build', symlink)
+ run_command('ln', '-s', '-f', meson.current_source_dir() / 'meson.build', symlink, check: true)
assert(fs.is_symlink(symlink), 'Symlink not detected.')
assert(not fs.is_symlink('meson.build'), 'Regular file detected as symlink.')
assert(not fs.is_symlink(f[0]), 'Regular file detected as symlink.')
diff --git a/test cases/common/227 very long commmand line/meson.build b/test cases/common/227 very long commmand line/meson.build
index 70058e6c8..f8df3115b 100644
--- a/test cases/common/227 very long commmand line/meson.build
+++ b/test cases/common/227 very long commmand line/meson.build
@@ -26,7 +26,7 @@ namelen = 260
nfiles = 50 + limit / namelen
message('Expected link commandline length is approximately ' + '@0@'.format((nfiles * (namelen+28))))
-seq = run_command('name_gen.py', nfiles.to_string(), meson.build_root()).stdout().strip().split('\n')
+seq = run_command('name_gen.py', nfiles.to_string(), meson.build_root(), check: true).stdout().strip().split('\n')
sources = []
codegen = find_program('codegen.py')
diff --git a/test cases/common/33 run program/meson.build b/test cases/common/33 run program/meson.build
index 8e472fd64..aa0a1d68e 100644
--- a/test cases/common/33 run program/meson.build
+++ b/test cases/common/33 run program/meson.build
@@ -1,9 +1,9 @@
project('run command', version : run_command('get-version.py', check : true).stdout().strip())
if build_machine.system() == 'windows'
- c = run_command('cmd', '/c', 'echo', 'hello')
+ c = run_command('cmd', '/c', 'echo', 'hello', check: false)
else
- c = run_command('echo', 'hello')
+ c = run_command('echo', 'hello', check: false)
endif
correct = 'hello'
@@ -25,9 +25,9 @@ endif
# Now the same with a script.
if build_machine.system() == 'windows'
- cs = run_command('scripts/hello.bat')
+ cs = run_command('scripts/hello.bat', check: false)
else
- cs = run_command('scripts/hello.sh')
+ cs = run_command('scripts/hello.sh', check: false)
endif
if cs.returncode() != 0
@@ -46,9 +46,9 @@ endif
f = files('meson.build')
if build_machine.system() == 'windows'
- c = run_command('cmd', '/c', 'echo', f)
+ c = run_command('cmd', '/c', 'echo', f, check: false)
else
- c = run_command('echo', f)
+ c = run_command('echo', f, check: false)
endif
if c.returncode() != 0
@@ -57,23 +57,23 @@ endif
py3 = import('python3').find_python()
-ret = run_command(py3, '-c', 'print("some output")')
+ret = run_command(py3, '-c', 'print("some output")', check: false)
assert(ret.returncode() == 0, 'failed to run python3: ' + ret.stderr())
assert(ret.stdout() == 'some output\n', 'failed to run python3')
-ret = run_command(py3, '-c', 'print("some output")', capture : false)
+ret = run_command(py3, '-c', 'print("some output")', check: false, capture: false)
assert(ret.returncode() == 0, 'failed to run python3: ' + ret.stderr())
assert(ret.stdout() == '', 'stdout is "@0@" instead of empty'.format(ret.stdout()))
c_env = environment()
c_env.append('CUSTOM_ENV_VAR', 'FOOBAR')
-ret = run_command(py3, '-c', 'import os; print(os.environ.get("CUSTOM_ENV_VAR"))', env : c_env)
+ret = run_command(py3, '-c', 'import os; print(os.environ.get("CUSTOM_ENV_VAR"))', env: c_env, check: false)
assert(ret.returncode() == 0, 'failed to run python3: ' + ret.stderr())
assert(ret.stdout() == 'FOOBAR\n', 'stdout is "@0@" instead of FOOBAR'.format(ret.stdout()))
dd = find_program('dd', required : false)
if dd.found()
- ret = run_command(dd, 'if=/dev/urandom', 'bs=10', 'count=1', capture: false)
+ ret = run_command(dd, 'if=/dev/urandom', 'bs=10', 'count=1', check: false, capture: false)
assert(ret.returncode() == 0, 'failed to run dd: ' + ret.stderr())
assert(ret.stdout() == '', 'stdout is "@0@" instead of empty'.format(ret.stdout()))
endif
diff --git a/test cases/common/44 pkgconfig-gen/meson.build b/test cases/common/44 pkgconfig-gen/meson.build
index 64965bc21..87c076735 100644
--- a/test cases/common/44 pkgconfig-gen/meson.build
+++ b/test cases/common/44 pkgconfig-gen/meson.build
@@ -13,7 +13,7 @@ if not pkgconfig.found()
error('MESON_SKIP_TEST: pkg-config not found')
endif
-v = run_command(pkgconfig, '--version').stdout().strip()
+v = run_command(pkgconfig, '--version', check: true).stdout().strip()
if v.version_compare('<0.29')
error('MESON_SKIP_TEST: pkg-config version \'' + v + '\' too old')
endif
diff --git a/test cases/common/48 file grabber/meson.build b/test cases/common/48 file grabber/meson.build
index e332c0b1e..a042b23fc 100644
--- a/test cases/common/48 file grabber/meson.build
+++ b/test cases/common/48 file grabber/meson.build
@@ -10,10 +10,10 @@ project('grabber', 'c')
# file bugs when it fails. :)
if build_machine.system() == 'windows'
- c = run_command('grabber.bat')
+ c = run_command('grabber.bat', check: false)
grabber = find_program('grabber2.bat')
else
- c = run_command('grabber.sh')
+ c = run_command('grabber.sh', check: false)
grabber = find_program('grabber.sh')
endif
diff --git a/test cases/common/48 file grabber/subdir/meson.build b/test cases/common/48 file grabber/subdir/meson.build
index 230d6f7de..9990e308f 100644
--- a/test cases/common/48 file grabber/subdir/meson.build
+++ b/test cases/common/48 file grabber/subdir/meson.build
@@ -1,4 +1,4 @@
-sc = run_command(grabber)
+sc = run_command(grabber, check: true)
subsources = sc.stdout().strip().split(newline)
se = executable('subprog', subsources)
diff --git a/test cases/common/97 find program path/meson.build b/test cases/common/97 find program path/meson.build
index 0a812499a..edb649363 100644
--- a/test cases/common/97 find program path/meson.build
+++ b/test cases/common/97 find program path/meson.build
@@ -12,11 +12,11 @@ py = configure_file(input : 'program.py',
configuration : configuration_data())
foreach f : [prog, progf, py, find_program(py), find_program(progf)]
- ret = run_command(python, f)
+ ret = run_command(python, f, check: false)
assert(ret.returncode() == 0, 'can\'t manually run @0@'.format(prog.path()))
assert(ret.stdout().strip() == 'Found', 'wrong output from manually-run @0@'.format(prog.path()))
- ret = run_command(f)
+ ret = run_command(f, check: false)
assert(ret.returncode() == 0, 'can\'t run @0@'.format(prog.path()))
assert(ret.stdout().strip() == 'Found', 'wrong output from @0@'.format(prog.path()))
endforeach
diff --git a/test cases/failing/80 override exe config/meson.build b/test cases/failing/80 override exe config/meson.build
index 29a74166b..a5d09249c 100644
--- a/test cases/failing/80 override exe config/meson.build
+++ b/test cases/failing/80 override exe config/meson.build
@@ -3,4 +3,4 @@ project('myexe', 'c')
foo = executable('foo', 'foo.c')
meson.override_find_program('bar', foo)
bar = find_program('bar')
-run_command(bar)
+run_command(bar, check: true)
diff --git a/test cases/fortran/15 include/meson.build b/test cases/fortran/15 include/meson.build
index 6ba0afa0a..e19c47fb4 100644
--- a/test cases/fortran/15 include/meson.build
+++ b/test cases/fortran/15 include/meson.build
@@ -10,8 +10,8 @@ syntax_exe = executable('include_syntax', 'include_syntax.f90')
test('Fortran include file syntax', syntax_exe)
# older CI runs into problems with too-old Ninja and CMake and Fortran
-ninja_version = run_command('ninja', '--version').stdout().strip()
-cmake_version = run_command('cmake', '--version').stdout().split()[2]
+ninja_version = run_command('ninja', '--version', check: true).stdout().strip()
+cmake_version = run_command('cmake', '--version', check: true).stdout().split()[2]
if ninja_version.version_compare('>=1.10.0') and cmake_version.version_compare('>=3.17.0')
cm.subproject('cmake_inc')
else
diff --git a/test cases/frameworks/10 gtk-doc/meson.build b/test cases/frameworks/10 gtk-doc/meson.build
index 43ee929a1..339e93f9d 100644
--- a/test cases/frameworks/10 gtk-doc/meson.build
+++ b/test cases/frameworks/10 gtk-doc/meson.build
@@ -15,7 +15,7 @@ subdir('include')
# disable this test unless a bug fix for spaces in pathnames is present
# https://bugzilla.gnome.org/show_bug.cgi?id=753145
-result = run_command(gtkdoc, ['--version'])
+result = run_command(gtkdoc, ['--version'], check: true)
gtkdoc_ver = result.stdout().strip()
if gtkdoc_ver == ''
gtkdoc_ver = result.stderr().strip()
diff --git a/test cases/frameworks/11 gir subproject/meson.build b/test cases/frameworks/11 gir subproject/meson.build
index a599ae9eb..3714daa34 100644
--- a/test cases/frameworks/11 gir subproject/meson.build
+++ b/test cases/frameworks/11 gir subproject/meson.build
@@ -7,7 +7,7 @@ endif
python3 = import('python3')
py3 = python3.find_python()
-if run_command(py3, '-c', 'import gi;').returncode() != 0
+if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0
error('MESON_SKIP_TEST python3-gi not found')
endif
diff --git a/test cases/frameworks/7 gnome/meson.build b/test cases/frameworks/7 gnome/meson.build
index e7ba56578..9f8640609 100644
--- a/test cases/frameworks/7 gnome/meson.build
+++ b/test cases/frameworks/7 gnome/meson.build
@@ -12,7 +12,7 @@ endif
python3 = import('python3')
py3 = python3.find_python()
-if run_command(py3, '-c', 'import gi;').returncode() != 0
+if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0
error('MESON_SKIP_TEST python3-gi not found')
endif
@@ -33,7 +33,7 @@ sys.exit(1)
'''
pretend_glib_old = false
-res = run_command(py3, '-c', pycode)
+res = run_command(py3, '-c', pycode, check: false)
if res.returncode() == 0
pretend_glib_old = true
endif
diff --git a/test cases/linuxlike/13 cmake dependency/meson.build b/test cases/linuxlike/13 cmake dependency/meson.build
index 871208b22..94d07d1c7 100644
--- a/test cases/linuxlike/13 cmake dependency/meson.build
+++ b/test cases/linuxlike/13 cmake dependency/meson.build
@@ -7,7 +7,7 @@ if not find_program('cmake', required: false).found()
endif
# CMake version
-cm_vers = run_command(find_program('./cmVers.sh')).stdout().strip()
+cm_vers = run_command(find_program('./cmVers.sh'), check: true).stdout().strip()
# Zlib is probably on all dev machines.
diff --git a/test cases/linuxlike/15 ld binary/meson.build b/test cases/linuxlike/15 ld binary/meson.build
index 987763edd..6452813ea 100644
--- a/test cases/linuxlike/15 ld binary/meson.build
+++ b/test cases/linuxlike/15 ld binary/meson.build
@@ -1,4 +1,4 @@
project('ld binary')
ld = find_program('ld')
-assert(run_command(ld, '--version').returncode() == 0)
+assert(run_command(ld, '--version', check: false).returncode() == 0)
diff --git a/test cases/rust/12 bindgen/meson.build b/test cases/rust/12 bindgen/meson.build
index 7844884e2..6f1864f77 100644
--- a/test cases/rust/12 bindgen/meson.build
+++ b/test cases/rust/12 bindgen/meson.build
@@ -12,7 +12,7 @@ endif
# valid. We must try to process a header file for this to work.
#
# See https://github.com/rust-lang/rust-bindgen/issues/1797
-result = run_command(prog_bindgen, 'include/other.h')
+result = run_command(prog_bindgen, 'include/other.h', check: false)
if result.returncode() != 0
error('MESON_SKIP_TEST bindgen does not seem to work')
endif
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