CMake tests: prepend name of package

This commit is contained in:
Shahram Najm 2015-07-14 17:11:57 +01:00
parent 078f615c3f
commit 37611fcf71
45 changed files with 175 additions and 145 deletions

74
.gitignore vendored
View File

@ -129,43 +129,43 @@ examples/C/c_grib_set_pv
examples/C/c_values_check examples/C/c_values_check
examples/C/*.sh.log examples/C/*.sh.log
examples/C/*.sh.trs examples/C/*.sh.trs
examples/F90/f_bufr_expanded examples/F90/eccodes_f_bufr_expanded
examples/F90/f_bufr_read_synop examples/F90/eccodes_f_bufr_read_synop
examples/F90/f_bufr_read_temp examples/F90/eccodes_f_bufr_read_temp
examples/F90/f_bufr_attributes examples/F90/eccodes_f_bufr_attributes
examples/F90/f_bufr_set_keys examples/F90/eccodes_f_bufr_set_keys
examples/F90/f_bufr_get_keys examples/F90/eccodes_f_bufr_get_keys
examples/F90/f_bufr_keys_iterator examples/F90/eccodes_f_bufr_keys_iterator
examples/F90/f_bufr_subset examples/F90/eccodes_f_bufr_subset
examples/F90/f_bufr_clone examples/F90/eccodes_f_bufr_clone
examples/F90/f_bufr_read_header examples/F90/eccodes_f_bufr_read_header
examples/F90/f_bufr_read_scatterometer examples/F90/eccodes_f_bufr_read_scatterometer
examples/F90/f_grib_clone examples/F90/eccodes_f_grib_clone
examples/F90/f_copy_message examples/F90/eccodes_f_copy_message
examples/F90/f_copy_namespace examples/F90/eccodes_f_copy_namespace
examples/F90/f_count_messages examples/F90/eccodes_f_count_messages
examples/F90/f_grib_get_keys examples/F90/eccodes_f_grib_get_keys
examples/F90/f_get_data examples/F90/eccodes_f_get_data
examples/F90/f_get_product_kind examples/F90/eccodes_f_get_product_kind
examples/F90/f_get_pl examples/F90/eccodes_f_get_pl
examples/F90/f_get_pv examples/F90/eccodes_f_get_pv
examples/F90/f_get_set_uuid examples/F90/eccodes_f_get_set_uuid
examples/F90/f_grib_index examples/F90/eccodes_f_grib_index
examples/F90/f_grib_keys_iterator examples/F90/eccodes_f_grib_keys_iterator
examples/F90/f_grib_multi examples/F90/eccodes_f_grib_multi
examples/F90/f_grib_multi_write examples/F90/eccodes_f_grib_multi_write
examples/F90/f_grib_nearest examples/F90/eccodes_f_grib_nearest
examples/F90/f_new_from_file examples/F90/eccodes_f_new_from_file
examples/F90/f_grib_precision examples/F90/eccodes_f_grib_precision
examples/F90/f_grib_print_data examples/F90/eccodes_f_grib_print_data
examples/F90/f_read_from_file examples/F90/eccodes_f_read_from_file
examples/F90/f_read_message examples/F90/eccodes_f_read_message
examples/F90/f_samples examples/F90/eccodes_f_samples
examples/F90/f_grib_set_keys examples/F90/eccodes_f_grib_set_keys
examples/F90/f_grib_set_bitmap examples/F90/eccodes_f_grib_set_bitmap
examples/F90/f_set_gvc examples/F90/eccodes_f_set_gvc
examples/F90/f_set_missing examples/F90/eccodes_f_set_missing
examples/F90/f_grib_set_pv examples/F90/eccodes_f_grib_set_pv
examples/F90/*.sh.log examples/F90/*.sh.log
examples/F90/*.sh.trs examples/F90/*.sh.trs
examples/F90/test-suite.log examples/F90/test-suite.log

View File

@ -15,7 +15,7 @@ endif()
# Download all data files doing md5 check on each # Download all data files doing md5 check on each
ecbuild_get_test_multidata( TARGET get_gribs ecbuild_get_test_multidata( TARGET eccodes_get_gribs
NAMES ${files_to_download} ) NAMES ${files_to_download} )
# Copy other files - e.g. reference data, text files etc from the source data dir # Copy other files - e.g. reference data, text files etc from the source data dir

View File

@ -13,7 +13,7 @@ STRING(REGEX REPLACE "\n" ";" bufr_refs_to_download "${bufr_refs_to_download}")
ecbuild_get_test_multidata( ecbuild_get_test_multidata(
TARGET get_bufrs TARGET eccodes_get_bufrs
NOCHECK NOCHECK
NAMES ${bufr_files_to_download} ${bufr_refs_to_download} NAMES ${bufr_files_to_download} ${bufr_refs_to_download}
) )

View File

@ -10,7 +10,7 @@ STRING(REGEX REPLACE "\n" ";" gts_refs_to_download "${gts_refs_to_download}")
ecbuild_get_test_multidata( ecbuild_get_test_multidata(
TARGET get_gts TARGET eccodes_get_gts
NOCHECK NOCHECK
NAMES ${gts_files_to_download} ${gts_refs_to_download} NAMES ${gts_files_to_download} ${gts_refs_to_download}
) )

View File

@ -13,7 +13,7 @@ STRING(REGEX REPLACE "\n" ";" metar_refs_to_download "${metar_refs_to_download}"
ecbuild_get_test_multidata( ecbuild_get_test_multidata(
TARGET get_metars TARGET eccodes_get_metars
NOCHECK NOCHECK
NAMES ${metar_files_to_download} ${metar_refs_to_download} NAMES ${metar_files_to_download} ${metar_refs_to_download}
) )

View File

@ -5,5 +5,5 @@ file(READ "tigge_data_files.txt" tigge_files_to_download)
string(REGEX REPLACE "\n" ";" tigge_files_to_download "${tigge_files_to_download}") string(REGEX REPLACE "\n" ";" tigge_files_to_download "${tigge_files_to_download}")
# Download all data files doing md5 check on each # Download all data files doing md5 check on each
ecbuild_get_test_multidata( TARGET get_tigge_gribs ecbuild_get_test_multidata( TARGET eccodes_get_tigge_gribs
NAMES ${tigge_files_to_download} ) NAMES ${tigge_files_to_download} )

View File

@ -90,17 +90,17 @@ list( APPEND tests
get_product_kind get_product_kind
) )
foreach( test ${tests} ) foreach( test ${tests} )
ecbuild_add_test( TARGET c_${test} ecbuild_add_test( TARGET eccodes_c_${test}
TYPE SCRIPT TYPE SCRIPT
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
TEST_DEPENDS get_gribs get_bufrs TEST_DEPENDS eccodes_get_gribs eccodes_get_bufrs
) )
endforeach() endforeach()
############################################# #############################################
# Tests with no script # Tests with no script
ecbuild_add_test( TARGET c_new_sample ecbuild_add_test( TARGET eccodes_c_new_sample
SOURCES new_sample.c SOURCES new_sample.c
LIBS eccodes LIBS eccodes
ARGS "out.grib" ARGS "out.grib"

View File

@ -46,13 +46,13 @@ list( APPEND tests
foreach( tool ${tests} ) foreach( tool ${tests} )
ecbuild_add_test( TARGET f_${tool} ecbuild_add_test( TARGET eccodes_f_${tool}
SOURCES ${tool}.f90 SOURCES ${tool}.f90
LINKER_LANGUAGE Fortran LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes LIBS eccodes_f90 eccodes
CONDITION HAVE_FORTRAN CONDITION HAVE_FORTRAN
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
TEST_DEPENDS get_gribs get_bufrs TEST_DEPENDS eccodes_get_gribs eccodes_get_bufrs
) )
endforeach() endforeach()
@ -82,7 +82,7 @@ ecbuild_add_executable( TARGET f_set_gvc
# # Note extra dependency # # Note extra dependency
# ecbuild_add_test( TARGET f_set_test # ecbuild_add_test( TARGET eccodes_f_set_test
# TYPE SCRIPT # TYPE SCRIPT
# DEPENDS set_gvc set # DEPENDS set_gvc set
# COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/set.sh # COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/set.sh

View File

@ -8,51 +8,81 @@ TESTS = copy_message.sh grib_get_keys.sh get_data.sh get_pl.sh get_pv.sh grib_ke
bufr_expanded.sh bufr_get_keys.sh bufr_read_header.sh bufr_read_synop.sh \ bufr_expanded.sh bufr_get_keys.sh bufr_read_header.sh bufr_read_synop.sh \
bufr_set_keys.sh bufr_keys_iterator.sh bufr_subset.sh get_product_kind.sh bufr_read_temp.sh bufr_read_scatterometer.sh bufr_set_keys.sh bufr_keys_iterator.sh bufr_subset.sh get_product_kind.sh bufr_read_temp.sh bufr_read_scatterometer.sh
noinst_PROGRAMS = f_grib_index f_copy_message f_grib_get_keys f_get_data f_get_pl f_get_pv f_grib_keys_iterator \ noinst_PROGRAMS = eccodes_f_grib_index \
f_grib_multi_write f_grib_multi f_grib_nearest f_grib_precision f_grib_print_data f_grib_set_keys \ eccodes_f_copy_message \
f_grib_set_bitmap f_set_missing f_grib_set_pv f_samples f_count_messages f_read_message \ eccodes_f_grib_get_keys \
f_read_from_file f_new_from_file f_copy_namespace f_get_set_uuid f_set_gvc \ eccodes_f_get_data \
f_grib_clone f_bufr_clone f_bufr_expanded f_bufr_get_keys f_bufr_read_header \ eccodes_f_get_pl \
f_bufr_read_synop f_bufr_set_keys f_bufr_keys_iterator f_bufr_subset f_bufr_attributes \ eccodes_f_get_pv \
f_get_product_kind f_bufr_read_temp f_bufr_read_scatterometer eccodes_f_grib_keys_iterator \
eccodes_f_grib_multi_write \
eccodes_f_grib_multi \
eccodes_f_grib_nearest \
eccodes_f_grib_precision \
eccodes_f_grib_print_data \
eccodes_f_grib_set_keys \
eccodes_f_grib_set_bitmap \
eccodes_f_set_missing \
eccodes_f_grib_set_pv \
eccodes_f_samples \
eccodes_f_count_messages \
eccodes_f_read_message \
eccodes_f_read_from_file \
eccodes_f_new_from_file \
eccodes_f_copy_namespace \
eccodes_f_get_set_uuid \
eccodes_f_set_gvc \
eccodes_f_grib_clone \
eccodes_f_bufr_clone \
eccodes_f_bufr_expanded \
eccodes_f_bufr_get_keys \
eccodes_f_bufr_read_header \
eccodes_f_bufr_read_synop \
eccodes_f_bufr_set_keys \
eccodes_f_bufr_keys_iterator \
eccodes_f_bufr_subset \
eccodes_f_bufr_attributes \
eccodes_f_get_product_kind \
eccodes_f_bufr_read_temp \
eccodes_f_bufr_read_scatterometer
f_grib_index_SOURCES=grib_index.f90 eccodes_f_grib_index_SOURCES=grib_index.f90
f_copy_message_SOURCES=copy_message.f90 eccodes_f_copy_message_SOURCES=copy_message.f90
f_grib_get_keys_SOURCES=grib_get_keys.f90 eccodes_f_grib_get_keys_SOURCES=grib_get_keys.f90
f_get_data_SOURCES=get_data.f90 eccodes_f_get_data_SOURCES=get_data.f90
f_get_pl_SOURCES=get_pl.f90 eccodes_f_get_pl_SOURCES=get_pl.f90
f_get_pv_SOURCES=get_pv.f90 eccodes_f_get_pv_SOURCES=get_pv.f90
f_grib_keys_iterator_SOURCES=grib_keys_iterator.f90 eccodes_f_grib_keys_iterator_SOURCES=grib_keys_iterator.f90
f_grib_multi_write_SOURCES=grib_multi_write.f90 eccodes_f_grib_multi_write_SOURCES=grib_multi_write.f90
f_grib_multi_SOURCES=grib_multi.f90 eccodes_f_grib_multi_SOURCES=grib_multi.f90
f_grib_nearest_SOURCES=grib_nearest.f90 eccodes_f_grib_nearest_SOURCES=grib_nearest.f90
f_grib_precision_SOURCES=grib_precision.f90 eccodes_f_grib_precision_SOURCES=grib_precision.f90
f_grib_print_data_SOURCES=grib_print_data.f90 eccodes_f_grib_print_data_SOURCES=grib_print_data.f90
f_grib_set_keys_SOURCES=grib_set_keys.f90 eccodes_f_grib_set_keys_SOURCES=grib_set_keys.f90
f_grib_set_bitmap_SOURCES=grib_set_bitmap.f90 eccodes_f_grib_set_bitmap_SOURCES=grib_set_bitmap.f90
f_set_missing_SOURCES=set_missing.f90 eccodes_f_set_missing_SOURCES=set_missing.f90
f_grib_set_pv_SOURCES=grib_set_pv.f90 eccodes_f_grib_set_pv_SOURCES=grib_set_pv.f90
f_samples_SOURCES=samples.f90 eccodes_f_samples_SOURCES=samples.f90
f_count_messages_SOURCES=count_messages.f90 eccodes_f_count_messages_SOURCES=count_messages.f90
f_read_message_SOURCES=read_message.f90 eccodes_f_read_message_SOURCES=read_message.f90
f_read_from_file_SOURCES=read_from_file.f90 eccodes_f_read_from_file_SOURCES=read_from_file.f90
f_new_from_file_SOURCES=new_from_file.f90 eccodes_f_new_from_file_SOURCES=new_from_file.f90
f_copy_namespace_SOURCES=copy_namespace.f90 eccodes_f_copy_namespace_SOURCES=copy_namespace.f90
f_get_set_uuid_SOURCES=get_set_uuid.f90 eccodes_f_get_set_uuid_SOURCES=get_set_uuid.f90
f_set_gvc_SOURCES=set_gvc.f90 eccodes_f_set_gvc_SOURCES=set_gvc.f90
f_grib_clone_SOURCES=grib_clone.f90 eccodes_f_grib_clone_SOURCES=grib_clone.f90
f_bufr_attributes_SOURCES=bufr_attributes.f90 eccodes_f_bufr_attributes_SOURCES=bufr_attributes.f90
f_bufr_clone_SOURCES=bufr_clone.f90 eccodes_f_bufr_clone_SOURCES=bufr_clone.f90
f_bufr_expanded_SOURCES=bufr_expanded.f90 eccodes_f_bufr_expanded_SOURCES=bufr_expanded.f90
f_bufr_get_keys_SOURCES=bufr_get_keys.f90 eccodes_f_bufr_get_keys_SOURCES=bufr_get_keys.f90
f_bufr_keys_iterator_SOURCES=bufr_keys_iterator.f90 eccodes_f_bufr_keys_iterator_SOURCES=bufr_keys_iterator.f90
f_bufr_read_header_SOURCES=bufr_read_header.f90 eccodes_f_bufr_read_header_SOURCES=bufr_read_header.f90
f_bufr_read_scatterometer_SOURCES=bufr_read_scatterometer.f90 eccodes_f_bufr_read_scatterometer_SOURCES=bufr_read_scatterometer.f90
f_bufr_read_synop_SOURCES=bufr_read_synop.f90 eccodes_f_bufr_read_synop_SOURCES=bufr_read_synop.f90
f_bufr_read_temp_SOURCES=bufr_read_temp.f90 eccodes_f_bufr_read_temp_SOURCES=bufr_read_temp.f90
f_bufr_set_keys_SOURCES=bufr_set_keys.f90 eccodes_f_bufr_set_keys_SOURCES=bufr_set_keys.f90
f_bufr_subset_SOURCES=bufr_subset.f90 eccodes_f_bufr_subset_SOURCES=bufr_subset.f90
f_get_product_kind_SOURCES=get_product_kind.f90 eccodes_f_get_product_kind_SOURCES=get_product_kind.f90
INCLUDES = -I$(top_builddir)/src INCLUDES = -I$(top_builddir)/src

View File

@ -24,7 +24,7 @@ rm -f ${fTmp} | true
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the values into a file and compare with reference #Write the values into a file and compare with reference
${examples_dir}/f_bufr_attributes #2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_attributes #2> $REDIRECT > $fTmp
#TODO: check the results #TODO: check the results

View File

@ -22,7 +22,7 @@ f=${data_dir}/bufr/syno_multi.bufr
REDIRECT=/dev/null REDIRECT=/dev/null
#The input ($f) and output ($fBufrTmp) are hardcoded in the f90 example!!! #The input ($f) and output ($fBufrTmp) are hardcoded in the f90 example!!!
${examples_dir}/f_bufr_clone >$REDIRECT 2> $REDIRECT ${examples_dir}/eccodes_f_bufr_clone >$REDIRECT 2> $REDIRECT
#Compare clone to the original #Compare clone to the original
set +e set +e

View File

@ -27,7 +27,7 @@ REDIRECT=/dev/null
#hardcoded in the example #hardcoded in the example
#Write the values into a file #Write the values into a file
${examples_dir}/f_bufr_expanded > $fTmp 2> $REDIRECT ${examples_dir}/eccodes_f_bufr_expanded > $fTmp 2> $REDIRECT
#TODO: add a better check. It could be compared against the bufrdc #TODO: add a better check. It could be compared against the bufrdc
# references. # references.

View File

@ -24,7 +24,7 @@ rm -f ${fTmp} | true
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the values into a file and compare with reference #Write the values into a file and compare with reference
${examples_dir}/f_bufr_get_keys 2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_get_keys 2> $REDIRECT > $fTmp
#TODO: check the results #TODO: check the results

View File

@ -22,7 +22,7 @@ REDIRECT=/dev/null
f=${data_dir}/bufr/syno_1.bufr f=${data_dir}/bufr/syno_1.bufr
#The input ($f) is hardcoded in the f90 example!!! #The input ($f) is hardcoded in the f90 example!!!
${examples_dir}/f_bufr_keys_iterator 2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_keys_iterator 2> $REDIRECT > $fTmp
#TODO: check the output #TODO: check the output

View File

@ -27,7 +27,7 @@ fRef=${f}.header.ref
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the values into a file and compare with reference #Write the values into a file and compare with reference
${examples_dir}/f_bufr_read_header $f 2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_read_header $f 2> $REDIRECT > $fTmp
#We compare output to the reference by ignoring the whitespaces #We compare output to the reference by ignoring the whitespaces
diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT diff -w $fRef $fTmp >$REDIRECT 2> $REDIRECT

View File

@ -25,7 +25,7 @@ rm -f $fTmp | true
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the key values into a file #Write the key values into a file
${examples_dir}/f_bufr_read_scatterometer 2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_read_scatterometer 2> $REDIRECT > $fTmp
# check the results # check the results

View File

@ -24,7 +24,7 @@ rm -f $fTmp | true
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the values into a file and compare with reference #Write the values into a file and compare with reference
${examples_dir}/f_bufr_read_synop #2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_read_synop #2> $REDIRECT > $fTmp
#TODO: check the output #TODO: check the output

View File

@ -24,7 +24,7 @@ rm -f $fTmp | true
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the key values into a file #Write the key values into a file
${examples_dir}/f_bufr_read_temp 2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_read_temp 2> $REDIRECT > $fTmp
#TODO: check the results #TODO: check the results

View File

@ -22,7 +22,7 @@ f=${data_dir}/bufr/syno_multi.bufr
REDIRECT=/dev/null REDIRECT=/dev/null
#The input ($f) and output ($fBufrTmp) are hardcoded in the f90 example!!! #The input ($f) and output ($fBufrTmp) are hardcoded in the f90 example!!!
${examples_dir}/f_bufr_set_keys >$REDIRECT 2> $REDIRECT ${examples_dir}/eccodes_f_bufr_set_keys >$REDIRECT 2> $REDIRECT
#Compare modified file to the original #Compare modified file to the original
set +e set +e

View File

@ -23,7 +23,7 @@ rm -f $fTmp | true
REDIRECT=/dev/null REDIRECT=/dev/null
#Write the values into a file and compare with reference #Write the values into a file and compare with reference
${examples_dir}/f_bufr_subset 2> $REDIRECT > $fTmp ${examples_dir}/eccodes_f_bufr_subset 2> $REDIRECT > $fTmp
#TODO: add a proper check when subsets are properly implemented #TODO: add a proper check when subsets are properly implemented

View File

@ -9,5 +9,5 @@
. ./include.sh . ./include.sh
${examples_dir}f_copy_message > /dev/null ${examples_dir}eccodes_f_copy_message > /dev/null
rm -f out.copy.grib1 rm -f out.copy.grib1

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_count_messages > /dev/null ${examples_dir}eccodes_f_count_messages > /dev/null

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_get_data > /dev/null ${examples_dir}eccodes_f_get_data > /dev/null

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_get_pl > /dev/null ${examples_dir}eccodes_f_get_pl > /dev/null

View File

@ -16,6 +16,6 @@ fTmp=${label}.tmp
# Create a file containing both GRIB and BUFR messages # Create a file containing both GRIB and BUFR messages
cat ${data_dir}/sample.grib2 ${data_dir}/bufr/syno_multi.bufr >$fTmp cat ${data_dir}/sample.grib2 ${data_dir}/bufr/syno_multi.bufr >$fTmp
${examples_dir}/f_get_product_kind $fTmp >/dev/null 2>&1 ${examples_dir}/eccodes_f_get_product_kind $fTmp >/dev/null 2>&1
rm -f ${fTmp} rm -f ${fTmp}

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_get_pv > /dev/null ${examples_dir}eccodes_f_get_pv > /dev/null

View File

@ -14,7 +14,7 @@ uuid=`${tools_dir}/grib_get -w count=1 -p uuidOfVGrid:s ${data_dir}/test_uuid.gr
[ "$uuid" = "08b1e836bc6911e1951fb51b5624ad8d" ] [ "$uuid" = "08b1e836bc6911e1951fb51b5624ad8d" ]
# This reads the file in data/test_uuid.grib2 and creates test_uuid.grib2 # This reads the file in data/test_uuid.grib2 and creates test_uuid.grib2
${examples_dir}f_get_set_uuid > /dev/null ${examples_dir}eccodes_f_get_set_uuid > /dev/null
# Check output was written # Check output was written
output=out_uuid.grib2 output=out_uuid.grib2

View File

@ -9,5 +9,5 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_clone > /dev/null ${examples_dir}eccodes_f_grib_clone > /dev/null
rm -f out.clone.grib1 rm -f out.clone.grib1

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_get_keys > /dev/null ${examples_dir}eccodes_f_grib_get_keys > /dev/null

View File

@ -11,11 +11,11 @@
# if an index file does not exist then # if an index file does not exist then
# create index and save to disk # create index and save to disk
${examples_dir}f_grib_index > index_f90.out ${examples_dir}eccodes_f_grib_index > index_f90.out
diff index_f90.out ${data_dir}/index_f90.ok diff index_f90.out ${data_dir}/index_f90.ok
# if an index file exists then load the index from it # if an index file exists then load the index from it
${examples_dir}f_grib_index > index_f90.out ${examples_dir}eccodes_f_grib_index > index_f90.out
diff index_f90.out ${data_dir}/index_f90.ok diff index_f90.out ${data_dir}/index_f90.ok
rm -f index.idx index_f90.out rm -f index.idx index_f90.out

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_keys_iterator > /dev/null ${examples_dir}eccodes_f_grib_keys_iterator > /dev/null

View File

@ -9,6 +9,6 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_multi > multi.out ${examples_dir}eccodes_f_grib_multi > multi.out
diff multi.out ${data_dir}/multi.ok diff multi.out ${data_dir}/multi.ok
rm -f multi.out rm -f multi.out

View File

@ -9,7 +9,7 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_multi_write > /dev/null ${examples_dir}eccodes_f_grib_multi_write > /dev/null
${tools_dir}/grib_compare ${data_dir}/multi_created.grib2 multi_created.grib2 ${tools_dir}/grib_compare ${data_dir}/multi_created.grib2 multi_created.grib2

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_nearest > /dev/null ${examples_dir}eccodes_f_grib_nearest > /dev/null

View File

@ -9,5 +9,5 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_precision > /dev/null ${examples_dir}eccodes_f_grib_precision > /dev/null
rm -f ${data_dir}/regular_latlon_surface_prec.grib1 rm -f ${data_dir}/regular_latlon_surface_prec.grib1

View File

@ -9,4 +9,4 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_print_data > /dev/null ${examples_dir}eccodes_f_grib_print_data > /dev/null

View File

@ -8,5 +8,5 @@
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
. ./include.sh . ./include.sh
${examples_dir}f_grib_set_bitmap > /dev/null ${examples_dir}eccodes_f_grib_set_bitmap > /dev/null
rm -f out.bmp.grib rm -f out.bmp.grib

View File

@ -9,9 +9,9 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_set_keys > /dev/null ${examples_dir}eccodes_f_grib_set_keys > /dev/null
${examples_dir}f_set_gvc > /dev/null ${examples_dir}eccodes_f_set_gvc > /dev/null
[ -f out_gvc.grib2 ] [ -f out_gvc.grib2 ]
rm -f out.set.grib1 out_gvc.grib2 rm -f out.set.grib1 out_gvc.grib2

View File

@ -9,5 +9,5 @@
. ./include.sh . ./include.sh
${examples_dir}f_grib_set_pv > /dev/null ${examples_dir}eccodes_f_grib_set_pv > /dev/null
rm -f out.pv.grib1 rm -f out.pv.grib1

View File

@ -13,4 +13,4 @@
# Check program completed successfully. We have to resort to testing # Check program completed successfully. We have to resort to testing
# the output as there is no way in Fortran to set the exit code # the output as there is no way in Fortran to set the exit code
# #
${examples_dir}f_read_from_file | grep 'Passed' >/dev/null ${examples_dir}eccodes_f_read_from_file | grep 'Passed' >/dev/null

View File

@ -14,7 +14,7 @@ out=out.readmsg.grib
rm -f $out | true rm -f $out | true
${examples_dir}f_read_message > /dev/null ${examples_dir}eccodes_f_read_message > /dev/null
${tools_dir}grib_compare $in $out ${tools_dir}grib_compare $in $out

View File

@ -16,12 +16,12 @@ cp ${data_dir}/regular_latlon_surface.grib1 ${data_dir}/regular_latlon_surface.g
# Change the ECCODES_SAMPLES_PATH: put the data dir first # Change the ECCODES_SAMPLES_PATH: put the data dir first
ECCODES_SAMPLES_PATH=${data_dir}:${samples_dir} ECCODES_SAMPLES_PATH=${data_dir}:${samples_dir}
export ECCODES_SAMPLES_PATH export ECCODES_SAMPLES_PATH
${examples_dir}f_samples > /dev/null ${examples_dir}eccodes_f_samples > /dev/null
# Extend the ECCODES_SAMPLES_PATH: put the data dir second # Extend the ECCODES_SAMPLES_PATH: put the data dir second
ECCODES_SAMPLES_PATH=${samples_dir}:${data_dir} ECCODES_SAMPLES_PATH=${samples_dir}:${data_dir}
export ECCODES_SAMPLES_PATH export ECCODES_SAMPLES_PATH
${examples_dir}f_samples > /dev/null ${examples_dir}eccodes_f_samples > /dev/null
rm -f out.samples.grib1 rm -f out.samples.grib1
rm -f ${data_dir}/regular_latlon_surface.grib1.tmpl rm -f ${data_dir}/regular_latlon_surface.grib1.tmpl

View File

@ -9,5 +9,5 @@
. ./include.sh . ./include.sh
${examples_dir}f_set_missing > /dev/null ${examples_dir}eccodes_f_set_missing > /dev/null
rm -f out_surface_level.grib2 rm -f out_surface_level.grib2

View File

@ -58,13 +58,13 @@ list( APPEND tests
metar_get_keys metar_get_keys
) )
foreach( test ${tests} ) foreach( test ${tests} )
ecbuild_add_test( TARGET p_${test}_test ecbuild_add_test( TARGET eccodes_p_${test}_test
TYPE SCRIPT TYPE SCRIPT
DEPENDS ${ptools} DEPENDS ${ptools}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
CONDITION HAVE_PYTHON CONDITION HAVE_PYTHON
RESOURCES ${test}.py RESOURCES ${test}.py
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE} ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
TEST_DEPENDS get_gribs get_tigge_gribs get_bufrs TEST_DEPENDS eccodes_get_gribs eccodes_get_tigge_gribs eccodes_get_bufrs
) )
endforeach() endforeach()

View File

@ -88,7 +88,7 @@ list( APPEND tests2
# These tests do not require any data downloads # These tests do not require any data downloads
foreach( test ${tests1} ) foreach( test ${tests1} )
ecbuild_add_test( TARGET t_${test} ecbuild_add_test( TARGET eccodes_t_${test}
TYPE SCRIPT TYPE SCRIPT
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
) )
@ -98,40 +98,40 @@ endforeach()
# means they will be downloaded at "make" time # means they will be downloaded at "make" time
# rather than when you do "make test". Use TEST_DEPENDS instead # rather than when you do "make test". Use TEST_DEPENDS instead
foreach( test ${tests2} ) foreach( test ${tests2} )
ecbuild_add_test( TARGET t_${test} ecbuild_add_test( TARGET eccodes_t_${test}
TYPE SCRIPT TYPE SCRIPT
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
TEST_DEPENDS get_gribs get_tigge_gribs get_bufrs get_metars get_gts TEST_DEPENDS eccodes_get_gribs eccodes_get_tigge_gribs eccodes_get_bufrs eccodes_get_metars eccodes_get_gts
) )
endforeach() endforeach()
########################################### ###########################################
# Note: the reference file is in the tests dir not data dir! # Note: the reference file is in the tests dir not data dir!
ecbuild_add_test( TARGET t_lamb_az_eq_area ecbuild_add_test( TARGET eccodes_t_lamb_az_eq_area
TYPE SCRIPT TYPE SCRIPT
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lamb_az_eq_area.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lamb_az_eq_area.sh
RESOURCES lamb_az_eq_area.ref RESOURCES lamb_az_eq_area.ref
TEST_DEPENDS get_gribs TEST_DEPENDS eccodes_get_gribs
) )
# These ones are conditional # These ones are conditional
ecbuild_add_test( TARGET t_grib_to_netcdf ecbuild_add_test( TARGET eccodes_t_grib_to_netcdf
TYPE SCRIPT TYPE SCRIPT
CONDITION HAVE_NETCDF CONDITION HAVE_NETCDF
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_to_netcdf.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_to_netcdf.sh
TEST_DEPENDS get_gribs TEST_DEPENDS eccodes_get_gribs
) )
ecbuild_add_test( TARGET t_jpeg ecbuild_add_test( TARGET eccodes_t_jpeg
TYPE SCRIPT TYPE SCRIPT
CONDITION HAVE_JPEG CONDITION HAVE_JPEG
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jpeg.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jpeg.sh
TEST_DEPENDS get_gribs TEST_DEPENDS eccodes_get_gribs
) )
ecbuild_add_test( TARGET t_ccsds ecbuild_add_test( TARGET eccodes_t_ccsds
TYPE SCRIPT TYPE SCRIPT
CONDITION HAVE_AEC CONDITION HAVE_AEC
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ccsds.sh COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ccsds.sh
TEST_DEPENDS get_gribs TEST_DEPENDS eccodes_get_gribs
) )