Disable test if not configured
. ./include.sh
#set -x
-# First decide if we have NetCDF enabled from configure.
-# Temporarily turn off the '-e' flag for set so we dont exit on error
-set +e
-tmp_out=tmp_msg.out
-skip_test=0
-rm -f $tmp_out
-# Invoke the grib_to_netcdf command with no options. If NetCDF was enabled
-# we get a usage message otherwise we get a specific message. Note: In both cases
-# the command fails.
-${tools_dir}/grib_to_netcdf > $tmp_out
-grep 'ecCodes was not compiled with NETCDF enabled' $tmp_out > /dev/null
-if [ $? -eq 0 ]; then
- # Message was found
- skip_test=1
-fi
-# Restore the set -e so any error causes us to exit
-set -e
-rm -f $tmp_out
-if [ $skip_test -eq 1 ]; then
- echo "NetCDF was not enabled. Skipping this test."
+# Disable if autotools being used
+src_config=${src_dir}/config.h
+if [ -f ${src_config} ]; then
exit 0
fi
-echo "NetCDF was enabled."
grib_files="\
regular_latlon_surface.grib2 \
