From cc51075dc6190b80f8170220236a9b45823b7b43 Mon Sep 17 00:00:00 2001 From: shahramn Date: Tue, 30 Apr 2024 08:36:28 +0100 Subject: [PATCH] Testing: Catch error messages --- tests/pseudo_budg.sh | 3 +++ tests/pseudo_diag.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/pseudo_budg.sh b/tests/pseudo_budg.sh index 4c50789d8..9c793a718 100755 --- a/tests/pseudo_budg.sh +++ b/tests/pseudo_budg.sh @@ -17,6 +17,9 @@ tempOut=temp.$label.txt tempRef=temp.$label.ref tempBud=temp.$label.bud +# Abort if any error messages are posted +export ECCODES_FAIL_IF_LOG_MESSAGE=1 + ${tools_dir}/grib_ls -j ${data_dir}/budg > $tempOut cat > $tempRef << EOF { "messages" : [ diff --git a/tests/pseudo_diag.sh b/tests/pseudo_diag.sh index 50208a45e..af45d6aea 100755 --- a/tests/pseudo_diag.sh +++ b/tests/pseudo_diag.sh @@ -20,6 +20,9 @@ REDIRECT=/dev/null sample=$ECCODES_SAMPLES_PATH/diag.tmpl +# Abort if any error messages are posted +export ECCODES_FAIL_IF_LOG_MESSAGE=1 + # Basic grib commands should not fail # ------------------------------------ ${tools_dir}/grib_ls $sample > $REDIRECT