mirror of https://github.com/ecmwf/eccodes.git
ECC-763: Break tests into two sets...
This commit is contained in:
parent
abc8d69783
commit
07dbcf3b36
|
@ -13,12 +13,12 @@ if( HAVE_AEC )
|
||||||
list(APPEND files_to_download ccsds.grib2)
|
list(APPEND files_to_download ccsds.grib2)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( ENABLE_EXTRA_TESTS )
|
||||||
# Download all data files doing md5 check on each
|
# Download all data files
|
||||||
ecbuild_get_test_multidata( TARGET eccodes_download_gribs
|
ecbuild_get_test_multidata( TARGET eccodes_download_gribs
|
||||||
NOCHECK
|
NOCHECK
|
||||||
NAMES ${files_to_download} )
|
NAMES ${files_to_download} )
|
||||||
|
endif()
|
||||||
|
|
||||||
# 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
|
||||||
LIST(APPEND other_files
|
LIST(APPEND other_files
|
||||||
|
|
|
@ -14,11 +14,13 @@ STRING(REGEX REPLACE "\n" ";" bufr_refs_to_download "${bufr_refs_to_download}")
|
||||||
# Exceptional case: download bufr files which have to be treated specially
|
# Exceptional case: download bufr files which have to be treated specially
|
||||||
LIST(APPEND bufr_refs_to_download "vos308014_v3_26.bufr") # See test ecc-197
|
LIST(APPEND bufr_refs_to_download "vos308014_v3_26.bufr") # See test ecc-197
|
||||||
|
|
||||||
ecbuild_get_test_multidata(
|
if( ENABLE_EXTRA_TESTS )
|
||||||
TARGET eccodes_download_bufrs
|
ecbuild_get_test_multidata(
|
||||||
NOCHECK
|
TARGET eccodes_download_bufrs
|
||||||
NAMES ${bufr_files_to_download} ${bufr_refs_to_download}
|
NOCHECK
|
||||||
)
|
NAMES ${bufr_files_to_download} ${bufr_refs_to_download}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Copy other files - e.g. text files etc from the source data/bufr dir
|
# Copy other files - e.g. text files etc from the source data/bufr dir
|
||||||
LIST(APPEND other_files
|
LIST(APPEND other_files
|
||||||
|
|
|
@ -8,12 +8,13 @@ STRING(REGEX REPLACE "\n" ";" gts_files_to_download "${gts_files_to_download}")
|
||||||
FILE(READ "gts_ref_files.txt" gts_refs_to_download)
|
FILE(READ "gts_ref_files.txt" gts_refs_to_download)
|
||||||
STRING(REGEX REPLACE "\n" ";" gts_refs_to_download "${gts_refs_to_download}")
|
STRING(REGEX REPLACE "\n" ";" gts_refs_to_download "${gts_refs_to_download}")
|
||||||
|
|
||||||
|
if( ENABLE_EXTRA_TESTS )
|
||||||
ecbuild_get_test_multidata(
|
ecbuild_get_test_multidata(
|
||||||
TARGET eccodes_download_gts
|
TARGET eccodes_download_gts
|
||||||
NOCHECK
|
NOCHECK
|
||||||
NAMES ${gts_files_to_download} ${gts_refs_to_download}
|
NAMES ${gts_files_to_download} ${gts_refs_to_download}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Copy other files - e.g. text files etc from the source data/gts dir
|
# Copy other files - e.g. text files etc from the source data/gts dir
|
||||||
LIST(APPEND other_files
|
LIST(APPEND other_files
|
||||||
|
|
|
@ -12,11 +12,13 @@ FILE(READ "metar_ref_files.txt" metar_refs_to_download)
|
||||||
STRING(REGEX REPLACE "\n" ";" metar_refs_to_download "${metar_refs_to_download}")
|
STRING(REGEX REPLACE "\n" ";" metar_refs_to_download "${metar_refs_to_download}")
|
||||||
|
|
||||||
|
|
||||||
ecbuild_get_test_multidata(
|
if( ENABLE_EXTRA_TESTS )
|
||||||
TARGET eccodes_download_metars
|
ecbuild_get_test_multidata(
|
||||||
NOCHECK
|
TARGET eccodes_download_metars
|
||||||
NAMES ${metar_files_to_download} ${metar_refs_to_download}
|
NOCHECK
|
||||||
)
|
NAMES ${metar_files_to_download} ${metar_refs_to_download}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Copy other files - e.g. text files etc from the source data/metar dir
|
# Copy other files - e.g. text files etc from the source data/metar dir
|
||||||
LIST(APPEND other_files
|
LIST(APPEND other_files
|
||||||
|
|
|
@ -4,10 +4,13 @@
|
||||||
file(READ "tigge_data_files.txt" tigge_files_to_download)
|
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
|
if( ENABLE_EXTRA_TESTS )
|
||||||
ecbuild_get_test_multidata( TARGET eccodes_download_tigge_gribs
|
# Download all data files
|
||||||
|
ecbuild_get_test_multidata( TARGET eccodes_download_tigge_gribs
|
||||||
NOCHECK
|
NOCHECK
|
||||||
NAMES ${tigge_files_to_download} )
|
NAMES ${tigge_files_to_download} )
|
||||||
|
endif()
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# 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
|
||||||
LIST(APPEND other_files
|
LIST(APPEND other_files
|
||||||
|
|
|
@ -60,26 +60,28 @@ endforeach()
|
||||||
|
|
||||||
# Now add each test (shell scripts)
|
# Now add each test (shell scripts)
|
||||||
########################################################################
|
########################################################################
|
||||||
list( APPEND tests
|
list( APPEND tests_basic
|
||||||
|
grib_multi
|
||||||
|
grib_set_data
|
||||||
|
large_grib1
|
||||||
|
sections_copy
|
||||||
|
)
|
||||||
|
list( APPEND tests_extra
|
||||||
grib_iterator
|
grib_iterator
|
||||||
grib_get_keys
|
grib_get_keys
|
||||||
grib_print_data
|
grib_print_data
|
||||||
grib_set_keys
|
grib_set_keys
|
||||||
grib_keys_iterator
|
grib_keys_iterator
|
||||||
grib_multi
|
|
||||||
grib_multi_write
|
grib_multi_write
|
||||||
grib_precision
|
grib_precision
|
||||||
grib_clone
|
grib_clone
|
||||||
grib_copy_message
|
grib_copy_message
|
||||||
grib_ensemble_index
|
grib_ensemble_index
|
||||||
grib_set_pv
|
grib_set_pv
|
||||||
grib_set_data
|
|
||||||
grib_set_bitmap
|
grib_set_bitmap
|
||||||
grib_list
|
grib_list
|
||||||
grib_get_data
|
grib_get_data
|
||||||
large_grib1
|
|
||||||
set_missing
|
set_missing
|
||||||
sections_copy
|
|
||||||
bufr_attributes
|
bufr_attributes
|
||||||
bufr_copy_data
|
bufr_copy_data
|
||||||
bufr_clone
|
bufr_clone
|
||||||
|
@ -96,10 +98,18 @@ list( APPEND tests
|
||||||
bufr_subset
|
bufr_subset
|
||||||
get_product_kind
|
get_product_kind
|
||||||
)
|
)
|
||||||
foreach( test ${tests} )
|
|
||||||
ecbuild_add_test( TARGET eccodes_c_${test}
|
foreach( test ${tests_basic} )
|
||||||
TYPE SCRIPT
|
ecbuild_add_test( TARGET eccodes_c_${test}
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
TYPE SCRIPT
|
||||||
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
foreach( test ${tests_extra} )
|
||||||
|
ecbuild_add_test( TARGET eccodes_c_${test}
|
||||||
|
TYPE SCRIPT
|
||||||
|
CONDITION ENABLE_EXTRA_TESTS
|
||||||
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
|
@ -7,7 +7,12 @@ execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_S
|
||||||
|
|
||||||
# Build the executables used by test scripts
|
# Build the executables used by test scripts
|
||||||
################################################
|
################################################
|
||||||
list( APPEND tests
|
list( APPEND tests_basic
|
||||||
|
grib_set_pv
|
||||||
|
grib_set_data
|
||||||
|
grib_ecc-671
|
||||||
|
)
|
||||||
|
list( APPEND tests_extra
|
||||||
grib_index
|
grib_index
|
||||||
grib_copy_message
|
grib_copy_message
|
||||||
bufr_copy_message
|
bufr_copy_message
|
||||||
|
@ -24,13 +29,10 @@ list( APPEND tests
|
||||||
grib_set_keys
|
grib_set_keys
|
||||||
grib_set_bitmap
|
grib_set_bitmap
|
||||||
grib_set_missing
|
grib_set_missing
|
||||||
grib_set_pv
|
|
||||||
grib_set_data
|
|
||||||
grib_samples
|
grib_samples
|
||||||
grib_count_messages
|
grib_count_messages
|
||||||
grib_count_messages_multi
|
grib_count_messages_multi
|
||||||
grib_copy_namespace
|
grib_copy_namespace
|
||||||
grib_ecc-671
|
|
||||||
read_message
|
read_message
|
||||||
read_from_file
|
read_from_file
|
||||||
get_set_uuid
|
get_set_uuid
|
||||||
|
@ -53,8 +55,7 @@ list( APPEND tests
|
||||||
get_product_kind
|
get_product_kind
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach( tool ${tests} )
|
foreach( tool ${tests_basic} )
|
||||||
|
|
||||||
ecbuild_add_test( TARGET eccodes_f_${tool}
|
ecbuild_add_test( TARGET eccodes_f_${tool}
|
||||||
SOURCES ${tool}.f90
|
SOURCES ${tool}.f90
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
|
@ -62,6 +63,16 @@ foreach( tool ${tests} )
|
||||||
CONDITION HAVE_FORTRAN
|
CONDITION HAVE_FORTRAN
|
||||||
RESOURCES bufr_read_scatterometer_f.ref
|
RESOURCES bufr_read_scatterometer_f.ref
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
foreach( tool ${tests_extra} )
|
||||||
|
ecbuild_add_test( TARGET eccodes_f_${tool}
|
||||||
|
SOURCES ${tool}.f90
|
||||||
|
LINKER_LANGUAGE Fortran
|
||||||
|
LIBS eccodes_f90 eccodes
|
||||||
|
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
|
||||||
|
RESOURCES bufr_read_scatterometer_f.ref
|
||||||
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
|
@ -27,7 +27,10 @@ endforeach()
|
||||||
|
|
||||||
# Now add each test
|
# Now add each test
|
||||||
#################################################
|
#################################################
|
||||||
list( APPEND tests
|
list( APPEND tests_basic
|
||||||
|
grib_set_pv
|
||||||
|
)
|
||||||
|
list( APPEND tests_extra
|
||||||
grib_clone
|
grib_clone
|
||||||
grib_count_messages
|
grib_count_messages
|
||||||
grib_get_message_offset
|
grib_get_message_offset
|
||||||
|
@ -39,7 +42,6 @@ list( APPEND tests
|
||||||
grib_nearest
|
grib_nearest
|
||||||
grib_print_data
|
grib_print_data
|
||||||
grib_samples
|
grib_samples
|
||||||
grib_set_pv
|
|
||||||
grib_set_missing
|
grib_set_missing
|
||||||
binary_message
|
binary_message
|
||||||
grib_set_bitmap
|
grib_set_bitmap
|
||||||
|
@ -66,17 +68,26 @@ list( APPEND tests
|
||||||
# which are only there for python 2.7 onwards
|
# which are only there for python 2.7 onwards
|
||||||
if( HAVE_PYTHON AND PYTHON_VERSION_STRING VERSION_GREATER "2.7" )
|
if( HAVE_PYTHON AND PYTHON_VERSION_STRING VERSION_GREATER "2.7" )
|
||||||
ecbuild_info("Python examples: Adding test for High-level Pythonic Interface")
|
ecbuild_info("Python examples: Adding test for High-level Pythonic Interface")
|
||||||
list( APPEND tests high_level_api )
|
list( APPEND tests_extra high_level_api )
|
||||||
list( APPEND tests grib_set_keys ) # Uses OrderedDict
|
list( APPEND tests_extra grib_set_keys ) # Uses OrderedDict
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach( test ${tests} )
|
foreach( test ${tests_basic} )
|
||||||
ecbuild_add_test( TARGET eccodes_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
|
||||||
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
||||||
|
)
|
||||||
|
endforeach()
|
||||||
|
foreach( test ${tests_extra} )
|
||||||
|
ecbuild_add_test( TARGET eccodes_p_${test}_test
|
||||||
|
TYPE SCRIPT
|
||||||
|
DEPENDS ${ptools}
|
||||||
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
||||||
|
CONDITION HAVE_PYTHON AND ENABLE_EXTRA_TESTS
|
||||||
|
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
||||||
TEST_DEPENDS eccodes_download_gribs eccodes_download_tigge_gribs eccodes_download_bufrs
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_tigge_gribs eccodes_download_bufrs
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
@ -86,7 +97,7 @@ ecbuild_add_test( TARGET eccodes_p_bufr_encode_flight_test
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
DEPENDS ${ptools}
|
DEPENDS ${ptools}
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_encode_flight.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bufr_encode_flight.sh
|
||||||
CONDITION HAVE_PYTHON
|
CONDITION HAVE_PYTHON AND ENABLE_EXTRA_TESTS
|
||||||
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
||||||
RESOURCES flight_data.csv
|
RESOURCES flight_data.csv
|
||||||
TEST_DEPENDS eccodes_download_bufrs
|
TEST_DEPENDS eccodes_download_bufrs
|
||||||
|
@ -97,7 +108,7 @@ ecbuild_add_test( TARGET eccodes_p_grib_ccsds_test
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
DEPENDS ${ptools}
|
DEPENDS ${ptools}
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_ccsds.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_ccsds.sh
|
||||||
CONDITION HAVE_PYTHON AND HAVE_AEC
|
CONDITION HAVE_PYTHON AND HAVE_AEC AND ENABLE_EXTRA_TESTS
|
||||||
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
ENVIRONMENT PYTHON=${PYTHON_EXECUTABLE}
|
||||||
TEST_DEPENDS eccodes_download_gribs
|
TEST_DEPENDS eccodes_download_gribs
|
||||||
)
|
)
|
||||||
|
|
|
@ -166,7 +166,7 @@ foreach( test ${tests_no_data_reqd} )
|
||||||
endforeach()
|
endforeach()
|
||||||
ecbuild_add_test( TARGET eccodes_t_check_gaussian_grids
|
ecbuild_add_test( TARGET eccodes_t_check_gaussian_grids
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
CONDITION ECCODES_INSTALL_EXTRA_TOOLS
|
CONDITION ECCODES_INSTALL_EXTRA_TOOLS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/check_gaussian_grids.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/check_gaussian_grids.sh
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -177,6 +177,7 @@ ecbuild_add_test( TARGET eccodes_t_check_gaussian_grids
|
||||||
foreach( test ${tests_data_reqd} )
|
foreach( test ${tests_data_reqd} )
|
||||||
ecbuild_add_test( TARGET eccodes_t_${test}
|
ecbuild_add_test( TARGET eccodes_t_${test}
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
|
CONDITION ENABLE_EXTRA_TESTS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
||||||
RESOURCES asca_139.t1.ref
|
RESOURCES asca_139.t1.ref
|
||||||
TEST_DEPENDS eccodes_download_gribs eccodes_download_tigge_gribs
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_tigge_gribs
|
||||||
|
@ -208,6 +209,7 @@ endif()
|
||||||
# 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 eccodes_t_lamb_az_eq_area
|
ecbuild_add_test( TARGET eccodes_t_lamb_az_eq_area
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
|
CONDITION ENABLE_EXTRA_TESTS
|
||||||
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 eccodes_download_gribs
|
TEST_DEPENDS eccodes_download_gribs
|
||||||
|
@ -229,28 +231,28 @@ endif()
|
||||||
|
|
||||||
ecbuild_add_test( TARGET eccodes_t_grib_to_netcdf
|
ecbuild_add_test( TARGET eccodes_t_grib_to_netcdf
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
CONDITION HAVE_NETCDF
|
CONDITION HAVE_NETCDF AND ENABLE_EXTRA_TESTS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_to_netcdf.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_to_netcdf.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs
|
TEST_DEPENDS eccodes_download_gribs
|
||||||
)
|
)
|
||||||
|
|
||||||
ecbuild_add_test( TARGET eccodes_t_grib_jpeg
|
ecbuild_add_test( TARGET eccodes_t_grib_jpeg
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
CONDITION HAVE_JPEG
|
CONDITION HAVE_JPEG AND ENABLE_EXTRA_TESTS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_jpeg.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_jpeg.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs
|
TEST_DEPENDS eccodes_download_gribs
|
||||||
)
|
)
|
||||||
|
|
||||||
ecbuild_add_test( TARGET eccodes_t_grib_png
|
ecbuild_add_test( TARGET eccodes_t_grib_png
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
CONDITION HAVE_PNG
|
CONDITION HAVE_PNG AND ENABLE_EXTRA_TESTS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_png.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_png.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs
|
TEST_DEPENDS eccodes_download_gribs
|
||||||
)
|
)
|
||||||
|
|
||||||
ecbuild_add_test( TARGET eccodes_t_grib_ccsds
|
ecbuild_add_test( TARGET eccodes_t_grib_ccsds
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
CONDITION HAVE_AEC
|
CONDITION HAVE_AEC AND ENABLE_EXTRA_TESTS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_ccsds.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_ccsds.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs
|
TEST_DEPENDS eccodes_download_gribs
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue