Merge branch 'develop' into cc/grib_const_char_star_propagation

This commit is contained in:
shahramn 2020-07-11 12:40:08 +01:00 committed by GitHub
commit 472376ef91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -12,6 +12,9 @@
REDIRECT=/dev/null
label="grib_dump_test"
temp=temp.$label.txt
if [ $HAVE_MEMFS -eq 1 ]; then
unset ECCODES_DEFINITION_PATH
unset ECCODES_SAMPLES_PATH
@ -76,3 +79,23 @@ for file in $files; do
${tools_dir}/grib_dump -O ${data_dir}/$file 2> $REDIRECT > $REDIRECT
fi
done
# Test for dumping a section
if [ $HAVE_JPEG -eq 0 ]; then
# No JPEG decoding enabled so dumping section 7 will issue errors
# but dumping non-data sections should work
file=${data_dir}/jpeg.grib2
${tools_dir}/grib_dump -O -p section_3,section_4 $file > $temp 2>&1
set +e
# Look for the word ERROR in output. We should not find any
grep -q 'ERROR ' $temp
if [ $? -eq 0 ]; then
echo "grib_dump on $file: found string ERROR in grib_dump output!"
cat $temp
exit 1
fi
set -e
fi
rm -f $temp

View File

@ -87,6 +87,7 @@ int main(int argc, char* argv[])
if ((path = getenv("ECCODES_DEFINITION_PATH")) != NULL) {
printf("Definition files path from environment variable");
printf(" ECCODES_DEFINITION_PATH=%s\n", path);
printf("Full definition files path=%s\n", context->grib_definition_files_path);
}
else if ((path = getenv("GRIB_DEFINITION_PATH")) != NULL) {
printf("Definition files path from environment variable");
@ -94,6 +95,7 @@ int main(int argc, char* argv[])
printf(
"(This is for backward compatibility. "
"It is recommended you use ECCODES_DEFINITION_PATH instead!)\n");
printf("Full definition files path=%s\n", context->grib_definition_files_path);
}
else {
printf("Default definition files path is used: %s\n", context->grib_definition_files_path);