Testing: Fix definitions path

This commit is contained in:
Shahram Najm 2023-09-02 19:54:55 +00:00
parent 2aa1e7efd1
commit 9b79f50bc3
1 changed files with 6 additions and 5 deletions

View File

@ -20,10 +20,9 @@ REDIRECT=/dev/null
# Expect failure as the key does not exist
set +e
${tools_dir}/grib_get -p boomerang ${data_dir}/regular_latlon_surface.grib1 2> $REDIRECT > $REDIRECT
if [ $? -eq 0 ] ; then
exit 1; # Should not have succeeded
fi
status=$?
set -e
[ $status -ne 0 ]
# ECC-1551: Print which key does not exist
set +e
@ -45,7 +44,9 @@ echo "uint32 key_uint32: transient;" >> $bootfile
echo "uint64 key_uint64: transient;" >> $bootfile
echo "uint32_little_endian key_uint32_le: transient;" >> $bootfile
echo "uint64_little_endian key_uint64_le: transient;" >> $bootfile
export ECCODES_DEFINITION_PATH=$tempDir/definitions
curr_defs=$ECCODES_DEFINITION_PATH
export ECCODES_DEFINITION_PATH=$PWD/$tempDir/definitions:$curr_defs
input=$ECCODES_SAMPLES_PATH/GRIB2.tmpl
set +e
${tools_dir}/grib_get -p key_uint16 $input > $tempText 2>&1
@ -54,7 +55,7 @@ ${tools_dir}/grib_get -p key_uint64 $input >> $tempText 2>&1
${tools_dir}/grib_get -p key_uint32_le $input >> $tempText 2>&1
${tools_dir}/grib_get -p key_uint64_le $input >> $tempText 2>&1
set -e
# cat $tempText
cat $tempText
# Clean up
cd $test_dir