mirror of https://github.com/ecmwf/eccodes.git
Testing: Run bufr_dump -Epython
This commit is contained in:
parent
d4d81deea2
commit
8509443968
|
@ -318,6 +318,8 @@ if( HAVE_BUILD_TOOLS )
|
||||||
list(APPEND tests_extra grib_tigge_conversions2)
|
list(APPEND tests_extra grib_tigge_conversions2)
|
||||||
list(APPEND tests_extra bufr_dump_encode_C)
|
list(APPEND tests_extra bufr_dump_encode_C)
|
||||||
list(APPEND tests_extra bufr_dump_decode_C)
|
list(APPEND tests_extra bufr_dump_decode_C)
|
||||||
|
list(APPEND tests_extra bufr_dump_encode_python)
|
||||||
|
list(APPEND tests_extra bufr_dump_decode_python)
|
||||||
list(APPEND tests_extra list_codetable_flagtable_keys)
|
list(APPEND tests_extra list_codetable_flagtable_keys)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,6 @@ tempDir=temp.${label}.dir
|
||||||
mkdir -p $tempDir
|
mkdir -p $tempDir
|
||||||
cd $tempDir
|
cd $tempDir
|
||||||
|
|
||||||
echo "PYTHONPATH set to $PYTHONPATH"
|
|
||||||
|
|
||||||
bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
||||||
|
|
||||||
for file in ${bufr_files}
|
for file in ${bufr_files}
|
||||||
|
@ -38,9 +36,9 @@ do
|
||||||
# Generate Python code from BUFR file
|
# Generate Python code from BUFR file
|
||||||
${tools_dir}/bufr_dump -Dpython $inputBufr > $tempSrc
|
${tools_dir}/bufr_dump -Dpython $inputBufr > $tempSrc
|
||||||
|
|
||||||
if test "x$PYTHON" != "x"; then
|
# if test "x$PYTHON" != "x"; then
|
||||||
$PYTHON $tempSrc $inputBufr
|
# $PYTHON $tempSrc $inputBufr
|
||||||
fi
|
# fi
|
||||||
rm -f $tempSrc
|
rm -f $tempSrc
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -39,21 +39,20 @@ do
|
||||||
|
|
||||||
#pylint --disable=E0602,R,C,W $tempSrc
|
#pylint --disable=E0602,R,C,W $tempSrc
|
||||||
|
|
||||||
|
# if test "x$PYTHON" != "x"; then
|
||||||
|
# # The python code always creates an output file called outfile.bufr
|
||||||
|
# $PYTHON $tempSrc
|
||||||
|
|
||||||
if test "x$PYTHON" != "x"; then
|
# # Check original BUFR file against one we generated from sample
|
||||||
# The python code always creates an output file called outfile.bufr
|
# ${tools_dir}/bufr_compare $inputBufr $tempBufr
|
||||||
$PYTHON $tempSrc
|
|
||||||
|
|
||||||
# Check original BUFR file against one we generated from sample
|
# TEMP_OUT1=${label}.$file.dump.out
|
||||||
${tools_dir}/bufr_compare $inputBufr $tempBufr
|
# TEMP_OUT2=${label}.$tempBufr.dump.out
|
||||||
|
# ${tools_dir}/bufr_dump -p $inputBufr > $TEMP_OUT1
|
||||||
TEMP_OUT1=${label}.$file.dump.out
|
# ${tools_dir}/bufr_dump -p $tempBufr > $TEMP_OUT2
|
||||||
TEMP_OUT2=${label}.$tempBufr.dump.out
|
# diff $TEMP_OUT1 $TEMP_OUT2
|
||||||
${tools_dir}/bufr_dump -p $inputBufr > $TEMP_OUT1
|
# rm -f $TEMP_OUT1 $TEMP_OUT2
|
||||||
${tools_dir}/bufr_dump -p $tempBufr > $TEMP_OUT2
|
# fi
|
||||||
diff $TEMP_OUT1 $TEMP_OUT2
|
|
||||||
rm -f $TEMP_OUT1 $TEMP_OUT2
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $tempSrc $tempBufr
|
rm -f $tempSrc $tempBufr
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue