mirror of https://github.com/ecmwf/eccodes.git
Testing: rename tests/second_order.sh
This commit is contained in:
parent
3c60e2a4b9
commit
bc579ec81e
|
@ -109,7 +109,7 @@ list( APPEND tests_data_reqd
|
||||||
index
|
index
|
||||||
bitmap
|
bitmap
|
||||||
list
|
list
|
||||||
second_order
|
grib_second_order
|
||||||
multi_from_message
|
multi_from_message
|
||||||
change_scanning
|
change_scanning
|
||||||
statistics
|
statistics
|
||||||
|
|
|
@ -43,7 +43,7 @@ TESTS = definitions.sh \
|
||||||
index.sh \
|
index.sh \
|
||||||
bitmap.sh \
|
bitmap.sh \
|
||||||
list.sh \
|
list.sh \
|
||||||
second_order.sh \
|
grib_second_order.sh \
|
||||||
multi_from_message.sh \
|
multi_from_message.sh \
|
||||||
change_scanning.sh \
|
change_scanning.sh \
|
||||||
julian.sh \
|
julian.sh \
|
||||||
|
|
|
@ -18,6 +18,7 @@ cd ${data_dir}
|
||||||
encoding=1
|
encoding=1
|
||||||
simple_no_bitmap=simple.grib
|
simple_no_bitmap=simple.grib
|
||||||
simple_bitmap=simple_bitmap.grib
|
simple_bitmap=simple_bitmap.grib
|
||||||
|
test_filter=temp.grib_second_order.filter
|
||||||
|
|
||||||
files_no_bitmap="gen_ext.grib \
|
files_no_bitmap="gen_ext.grib \
|
||||||
gen_ext_boust.grib \
|
gen_ext_boust.grib \
|
||||||
|
@ -38,11 +39,11 @@ simple_bitmap.grib"
|
||||||
no_packing="gen.grib|row.grib|gen_bitmap.grib|constant_width_bitmap.grib|constant_width_boust_bitmap.grib"
|
no_packing="gen.grib|row.grib|gen_bitmap.grib|constant_width_bitmap.grib|constant_width_boust_bitmap.grib"
|
||||||
|
|
||||||
test_data() {
|
test_data() {
|
||||||
${tools_dir}/grib_filter test.filter $simple > $simple.data
|
${tools_dir}/grib_filter $test_filter $simple > $simple.data
|
||||||
|
|
||||||
for f in $files
|
for f in $files
|
||||||
do
|
do
|
||||||
${tools_dir}/grib_filter test.filter $f > $f.data
|
${tools_dir}/grib_filter $test_filter $f > $f.data
|
||||||
diff $simple.data $f.data > /dev/null
|
diff $simple.data $f.data > /dev/null
|
||||||
${tools_dir}/grib_compare -cvalues $f $simple
|
${tools_dir}/grib_compare -cvalues $f $simple
|
||||||
echo $f decoding test passed > $REDIRECT
|
echo $f decoding test passed > $REDIRECT
|
||||||
|
@ -52,7 +53,7 @@ test_data() {
|
||||||
then
|
then
|
||||||
rm -f $f.copied
|
rm -f $f.copied
|
||||||
${tools_dir}/grib_copy -r $f $f.copied
|
${tools_dir}/grib_copy -r $f $f.copied
|
||||||
${tools_dir}/grib_filter test.filter $f.copied > $f.copied.data
|
${tools_dir}/grib_filter $test_filter $f.copied > $f.copied.data
|
||||||
diff $simple.data $f.copied.data > /dev/null
|
diff $simple.data $f.copied.data > /dev/null
|
||||||
${tools_dir}/grib_compare -cvalues $f.copied $simple
|
${tools_dir}/grib_compare -cvalues $f.copied $simple
|
||||||
echo $f encoding test passed > $REDIRECT
|
echo $f encoding test passed > $REDIRECT
|
||||||
|
@ -64,7 +65,7 @@ test_data() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cat > test.filter<<EOF
|
cat > $test_filter<<EOF
|
||||||
print "[values!1]!";
|
print "[values!1]!";
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -105,9 +106,9 @@ res=`${tools_dir}/grib_get -w count=1 -l 0,0 lfpw.grib1`
|
||||||
g1files="lfpw.grib1
|
g1files="lfpw.grib1
|
||||||
gen_ext_spd_2.grib
|
gen_ext_spd_2.grib
|
||||||
gen_ext_spd_3.grib"
|
gen_ext_spd_3.grib"
|
||||||
temp_grib1=temp.second_order.grib
|
temp_grib1=temp.grib_second_order.grib
|
||||||
temp_stat1=temp.second_order.stat1
|
temp_stat1=temp.grib_second_order.stat1
|
||||||
temp_stat2=temp.second_order.stat2
|
temp_stat2=temp.grib_second_order.stat2
|
||||||
|
|
||||||
for f1 in $g1files; do
|
for f1 in $g1files; do
|
||||||
# This does unpack and repack
|
# This does unpack and repack
|
||||||
|
@ -116,6 +117,6 @@ for f1 in $g1files; do
|
||||||
${tools_dir}/grib_get -n statistics $temp_grib1 > $temp_stat2
|
${tools_dir}/grib_get -n statistics $temp_grib1 > $temp_stat2
|
||||||
perl ${test_dir}/number_compare.pl $temp_stat1 $temp_stat2
|
perl ${test_dir}/number_compare.pl $temp_stat1 $temp_stat2
|
||||||
done
|
done
|
||||||
|
rm -f $temp_stat1 $temp_stat2
|
||||||
rm -f $temp_grib1 $sec_ord_bmp
|
rm -f $temp_grib1 $sec_ord_bmp
|
||||||
rm -f test.filter
|
rm -f $test_filter
|
Loading…
Reference in New Issue