"Fossies" - the Fresh Open Source Software Archive

Member "fimex-1.4.1/test/testGrib2SomeUndefined.sh.in" (30 Oct 2019, 946 Bytes) of package /linux/privat/fimex-1.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/sh
    2 
    3 set -e
    4 
    5 GRIB_API_DIR="@grib_api_DIR@"
    6 if test -d "@grib_api_DIR@/bin"; then
    7     export PATH="@grib_api_DIR@/bin:$PATH"
    8 fi
    9 if test -d "@eccodes_BASE_DIR@/bin"; then
   10     export PATH="@eccodes_BASE_DIR@/bin:$PATH"
   11 fi
   12 
   13 TEST="test writing grib2 with undefined values"
   14 if command -v grib_get_data > /dev/null; then
   15     echo "running $TEST"
   16 else
   17     echo "grib_get_data not found, skipping $TEST"
   18     exit 0
   19 fi
   20 
   21 DATA="testdata-grib2-some-undefined"
   22 DATA_NC="@CMAKE_CURRENT_SOURCE_DIR@/${DATA}.nc"
   23 DATA_G2="@CMAKE_CURRENT_BINARY_DIR@/${DATA}.grib2"
   24 
   25 ./fimex.sh --input.file "${DATA_NC}" \
   26            --output.file "${DATA_G2}" \
   27            --output.type grib2 \
   28            --output.config "@CMAKE_SOURCE_DIR@/share/etc/cdmGribWriterConfig.xml"
   29 FI_EXIT="$?"
   30 
   31 command grib_get_data "${DATA_G2}" 1>/dev/null
   32 GG_EXIT="$?"
   33 
   34 rm -f "${DATA_G2}"
   35 if [ "$FI_EXIT" != 0 -o "$GG_EXIT" != 0 ]; then
   36   echo "failed $TEST"
   37   exit 1
   38 fi
   39 echo "success"
   40 exit 0