summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-07-22 10:57:50 +0200
committerBastien Nocera <hadess@hadess.net>2022-07-22 15:16:26 +0200
commit48ba464c68e111fb701d9ddc5c8859cfdef5999f (patch)
tree12edc0d136eac21309640a377f5dde18cfd50f88
parent41747b8d6c6512b8564f5fd3c9ccc65e7fc2e2c0 (diff)
downloadaccountsservice-48ba464c68e111fb701d9ddc5c8859cfdef5999f.tar.gz
build: Fix warning about run_command() usage
WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300
-rw-r--r--meson.build8
-rw-r--r--tests/meson.build4
2 files changed, 6 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 075776f..6f0fadb 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project(
'accountsservice', 'c',
- version: run_command(['./generate-version.sh']).stdout().strip(),
+ version: run_command(['./generate-version.sh'], check: true).stdout().strip(),
license: 'GPL3+',
default_options: 'buildtype=debugoptimized',
meson_version: '>= 0.50.0',
@@ -102,7 +102,7 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
config_h.set('PATH_WTMP', '_PATH_WTMPX')
else
path_wtmp = '/var/log/utx.log'
- assert(run_command('test', '-e', path_wtmp).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
+ assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
config_h.set_quoted('PATH_WTMP', path_wtmp)
endif
@@ -186,10 +186,10 @@ endif
# Core configuration
admin_group = get_option('admin_group')
if admin_group == ''
- if run_command('test', '-e', '/etc/debian_version').returncode() == 0
+ if run_command('test', '-e', '/etc/debian_version', check: false).returncode() == 0
admin_group = 'sudo'
# FIXME: this has been left for documentation purposes
- elif run_command('test', '-e', '/etc/sysconfig/network-scripts').returncode() == 0
+ elif run_command('test', '-e', '/etc/sysconfig/network-scripts', check: false).returncode() == 0
admin_group = 'wheel'
else
admin_group = 'wheel'
diff --git a/tests/meson.build b/tests/meson.build
index d4a2570..ddbc680 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -17,7 +17,7 @@ if get_option('introspection')
]
foreach module : python3_test_modules
- if run_command(python3, '-c', 'import @0@'.format(module)).returncode() != 0
+ if run_command(python3, '-c', 'import @0@'.format(module), check: false).returncode() != 0
python3_test_modules_found = false
warning('Python3 module \'' + module + '\' needed by test suite not found')
break
@@ -38,7 +38,7 @@ if python3_test_modules_found
base_args = test_file
suite = ['accounts-service']
- r = run_command(unittest_inspector, test_file)
+ r = run_command(unittest_inspector, test_file, check: true)
unit_tests = r.stdout().strip().split('\n')
if r.returncode() == 0 and unit_tests.length() > 0