Testing: Ensure tests pass with -DENABLE_BUILD_TOOLS=0

This commit is contained in:
Shahram Najm 2023-02-27 10:32:58 +00:00
parent 50138bd42b
commit 6d49930616
2 changed files with 7 additions and 5 deletions

View File

@ -15,9 +15,11 @@ tempGrib="out_surface_level.grib2"
${examples_dir}/c_grib_set_missing
# Check the keys have been set to MISSING
sf=`${tools_dir}/grib_get -p scaleFactorOfFirstFixedSurface $tempGrib`
[ "$sf" = "MISSING" ]
sf=`${tools_dir}/grib_get -p scaledValueOfFirstFixedSurface $tempGrib`
[ "$sf" = "MISSING" ]
if [ -f "${tools_dir}/grib_get" ]; then
sf=`${tools_dir}/grib_get -p scaleFactorOfFirstFixedSurface $tempGrib`
[ "$sf" = "MISSING" ]
sf=`${tools_dir}/grib_get -p scaledValueOfFirstFixedSurface $tempGrib`
[ "$sf" = "MISSING" ]
fi
rm -f $tempGrib

View File

@ -123,7 +123,7 @@ ecbuild_add_test( TARGET eccodes_f_grib_set_packing
SOURCES grib_set_packing.f90
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes
CONDITION HAVE_AEC AND HAVE_FORTRAN
CONDITION HAVE_BUILD_TOOLS AND HAVE_AEC AND HAVE_FORTRAN
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
# Executables without a shell script