Testing: Catch error messages

This commit is contained in:
shahramn 2024-04-30 08:36:28 +01:00
parent b250b23246
commit cc51075dc6
2 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,9 @@ tempOut=temp.$label.txt
tempRef=temp.$label.ref tempRef=temp.$label.ref
tempBud=temp.$label.bud 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 ${tools_dir}/grib_ls -j ${data_dir}/budg > $tempOut
cat > $tempRef << EOF cat > $tempRef << EOF
{ "messages" : [ { "messages" : [

View File

@ -20,6 +20,9 @@ REDIRECT=/dev/null
sample=$ECCODES_SAMPLES_PATH/diag.tmpl 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 # Basic grib commands should not fail
# ------------------------------------ # ------------------------------------
${tools_dir}/grib_ls $sample > $REDIRECT ${tools_dir}/grib_ls $sample > $REDIRECT