[tracker-miners/wip/carlosg/compiler-warnings: 8/8] build: Add 'check' kwarg on all run_command()




commit f7de0169c04f0cf332ca207457df590dee8df570
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Aug 28 23:18:23 2022 +0200

    build: Add 'check' kwarg on all run_command()
    
    Meson warns about this during project creation. Pass the kwarg to avoid
    the warning, and actually check the return values.

 src/tracker-extract/meson.build    | 4 ++--
 tests/functional-tests/meson.build | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-extract/meson.build b/src/tracker-extract/meson.build
index ccf806ca7..183704e6f 100644
--- a/src/tracker-extract/meson.build
+++ b/src/tracker-extract/meson.build
@@ -116,7 +116,7 @@ foreach module : modules
     install: true,
     install_dir: tracker_extract_modules_dir)
 
-  hash = run_command('calculate-hash.sh', [sources] + files_extract)
+  hash = run_command('calculate-hash.sh', [sources] + files_extract, check: true)
 
   foreach rule : rules
     configure_file(input: rule,
@@ -193,7 +193,7 @@ endif
 # Populate a directory inside the build tree with the extract rules that are
 # enabled in this build configuration.
 setup_extract_rules = join_paths(meson.current_source_dir(), 'setup-extract-rules.sh')
-result = run_command(setup_extract_rules, meson.current_source_dir(), tracker_uninstalled_extract_rules_dir, 
enabled_rule_files)
+result = run_command(setup_extract_rules, meson.current_source_dir(), tracker_uninstalled_extract_rules_dir, 
enabled_rule_files, check: true)
 if result.returncode() != 0
     output = result.stdout().strip()
     errortxt = result.stderr().strip()
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index cb4ce00fd..ef4dcab65 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -144,7 +144,7 @@ if generic_media_handler_name != 'none'
 endif
 
 detect_h264_codec = join_paths(meson.current_source_dir(), 'detect-h264-codec.sh')
-detect_h264_codec_result = run_command(detect_h264_codec)
+detect_h264_codec_result = run_command(detect_h264_codec, check: false)
 
 if detect_h264_codec_result.returncode() == 0
   if gstreamer.version() >= '1.20.0'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]