Tests: Run with different input GRIB files

This commit is contained in:
Shahram Najm 2018-05-18 16:01:38 +01:00
parent d9a9ce5fe4
commit d43a19a9ae
1 changed files with 33 additions and 21 deletions

View File

@ -13,6 +13,10 @@
label="grib_ecc-604"
temp_dir=tempdir.${label}
NUM_THREADS=6
NUM_ITER=100
OUTPUT=output
validate()
{
echo "Checking every output file is identical..."
@ -25,27 +29,19 @@ validate()
# Should be the same as the first
[ "$res" = "$ck1" ]
}
NUM_THREADS=6
NUM_ITER=200
OUTPUT=output
input=$ECCODES_SAMPLES_PATH/gg_sfc_grib2.tmpl
# input=$ECCODES_SAMPLES_PATH/gg_sfc_grib1.tmpl
rm -fr $temp_dir
mkdir -p $temp_dir
cd $temp_dir
process()
{
input=$1 # The input GRIB file
# Test 01: Clone + output
# ------------------------
mkdir -p $OUTPUT
rm -fr $OUTPUT; mkdir -p $OUTPUT
time ${test_dir}/grib_ecc-604-1 par $input $NUM_THREADS $NUM_ITER
validate
# Test 02: No clone + output
# --------------------------
rm -fr $OUTPUT
mkdir -p $OUTPUT
rm -fr $OUTPUT; mkdir -p $OUTPUT
time ${test_dir}/grib_ecc-604-2 par $input $NUM_THREADS $NUM_ITER
validate
@ -53,6 +49,22 @@ validate
# ---------------------------
rm -fr $OUTPUT
time ${test_dir}/grib_ecc-604-3 par $input $NUM_THREADS $NUM_ITER
# Nothing to validate as there is no output
}
###################################################
rm -fr $temp_dir
mkdir -p $temp_dir
cd $temp_dir
# GRIB1 inputs
process $ECCODES_SAMPLES_PATH/gg_sfc_grib1.tmpl
process ${data_dir}/gen_bitmap.grib
process ${data_dir}/spectral_complex.grib1
#process ${data_dir}/gen.grib
# GRIB2 inputs
process $ECCODES_SAMPLES_PATH/gg_sfc_grib2.tmpl
process ${data_dir}/sample.grib2
# Clean up