2014-03-31 12:57:06 +00:00
|
|
|
# tests/CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Configure the file which all CMake tests will include
|
|
|
|
configure_file( include.ctest.sh.in include.ctest.sh @ONLY )
|
|
|
|
|
|
|
|
# Build the executables used by test scripts
|
|
|
|
################################################
|
|
|
|
list( APPEND test_bins
|
|
|
|
read_any
|
|
|
|
julian
|
|
|
|
index
|
|
|
|
multi_from_message
|
|
|
|
read_index
|
|
|
|
unit_tests
|
|
|
|
gauss_sub
|
|
|
|
)
|
2014-06-18 16:14:01 +00:00
|
|
|
|
2014-03-31 12:57:06 +00:00
|
|
|
foreach( tool ${test_bins} )
|
|
|
|
# here we use the fact that each tool has only one C file that matches its name
|
|
|
|
ecbuild_add_executable( TARGET ${tool}
|
|
|
|
NOINSTALL
|
|
|
|
SOURCES ${tool}.c
|
2015-02-13 18:04:42 +00:00
|
|
|
LIBS eccodes
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
2015-01-24 19:00:15 +00:00
|
|
|
# Now add each test (shell scripts)
|
2014-03-31 12:57:06 +00:00
|
|
|
#################################################
|
2015-03-12 18:21:52 +00:00
|
|
|
list( APPEND tests1
|
2014-04-15 10:37:21 +00:00
|
|
|
definitions
|
2014-11-13 16:47:32 +00:00
|
|
|
calendar
|
2015-03-12 18:21:52 +00:00
|
|
|
unit_tests
|
|
|
|
)
|
|
|
|
list( APPEND tests2
|
2014-08-11 09:26:05 +00:00
|
|
|
bufr_dump
|
2014-11-04 13:59:20 +00:00
|
|
|
bufrdc_desc_ref
|
2014-08-11 09:26:05 +00:00
|
|
|
bufrdc_ref
|
2015-02-03 13:27:57 +00:00
|
|
|
bufr_compare
|
2015-02-03 10:06:03 +00:00
|
|
|
bufr_copy
|
2015-02-03 09:14:05 +00:00
|
|
|
bufr_count
|
2015-02-02 17:17:29 +00:00
|
|
|
bufr_get
|
2015-01-30 16:31:18 +00:00
|
|
|
bufr_filter
|
2015-01-07 16:08:48 +00:00
|
|
|
bufr_json
|
2015-01-22 09:25:57 +00:00
|
|
|
bufr_ls
|
2015-03-17 16:00:13 +00:00
|
|
|
gts_ls
|
2015-02-02 15:16:32 +00:00
|
|
|
bufr_set
|
2014-04-15 10:37:21 +00:00
|
|
|
ieee
|
|
|
|
grib1to2
|
|
|
|
grib2to1
|
|
|
|
badgrib
|
|
|
|
ls
|
|
|
|
filter
|
|
|
|
multi
|
|
|
|
budg
|
|
|
|
gridType
|
|
|
|
concept
|
|
|
|
decimalPrecision
|
|
|
|
bitsPerValue
|
|
|
|
get_fail
|
|
|
|
missing
|
|
|
|
local
|
|
|
|
step
|
|
|
|
set
|
|
|
|
iterator
|
|
|
|
compare
|
|
|
|
level
|
|
|
|
index
|
|
|
|
bitmap
|
|
|
|
list
|
|
|
|
second_order
|
|
|
|
multi_from_message
|
|
|
|
change_scanning
|
|
|
|
julian
|
|
|
|
statistics
|
|
|
|
tigge
|
|
|
|
tigge_conversions
|
|
|
|
read_any
|
|
|
|
padding
|
|
|
|
debug
|
|
|
|
)
|
2014-06-18 16:14:01 +00:00
|
|
|
|
2015-03-12 18:21:52 +00:00
|
|
|
# These tests do not require any data downloads
|
|
|
|
foreach( test ${tests1} )
|
|
|
|
ecbuild_add_test( TARGET t_${test}
|
|
|
|
TYPE SCRIPT
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
|
|
|
RESOURCES include.sh number_compare.pl
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
2015-03-10 15:52:33 +00:00
|
|
|
# Note: making the test dependent on the grib files (with DEPENDS)
|
|
|
|
# means they will be downloaded at "make" time
|
|
|
|
# rather than when you do "make test". Use TEST_DEPENDS instead
|
2015-03-12 18:21:52 +00:00
|
|
|
foreach( test ${tests2} )
|
2014-04-15 10:37:21 +00:00
|
|
|
ecbuild_add_test( TARGET t_${test}
|
|
|
|
TYPE SCRIPT
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
2014-10-27 17:08:30 +00:00
|
|
|
RESOURCES include.sh number_compare.pl
|
2015-03-18 10:36:12 +00:00
|
|
|
TEST_DEPENDS get_gribs get_tigge_gribs get_bufrs get_gts
|
2014-06-18 16:14:01 +00:00
|
|
|
)
|
2014-04-15 10:37:21 +00:00
|
|
|
endforeach()
|
2014-03-31 12:57:06 +00:00
|
|
|
|
|
|
|
###########################################
|
|
|
|
# Note: the reference file is in the tests dir not data dir!
|
|
|
|
ecbuild_add_test( TARGET t_lamb_az_eq_area
|
|
|
|
TYPE SCRIPT
|
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/lamb_az_eq_area.sh
|
|
|
|
RESOURCES include.sh lamb_az_eq_area.ref
|
2015-03-10 15:52:33 +00:00
|
|
|
TEST_DEPENDS get_gribs
|
2014-03-31 12:57:06 +00:00
|
|
|
)
|
|
|
|
|
2014-04-15 10:37:21 +00:00
|
|
|
# These ones are conditional
|
2014-06-18 16:14:01 +00:00
|
|
|
ecbuild_add_test( TARGET t_grib_to_netcdf
|
2014-03-31 12:57:06 +00:00
|
|
|
TYPE SCRIPT
|
2014-10-24 12:36:19 +00:00
|
|
|
CONDITION HAVE_NETCDF
|
2014-03-31 12:57:06 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_to_netcdf.sh
|
|
|
|
RESOURCES include.sh
|
2015-03-10 15:52:33 +00:00
|
|
|
TEST_DEPENDS get_gribs
|
2014-06-18 16:14:01 +00:00
|
|
|
)
|
2014-03-31 12:57:06 +00:00
|
|
|
|
2014-06-18 16:14:01 +00:00
|
|
|
ecbuild_add_test( TARGET t_jpeg
|
|
|
|
TYPE SCRIPT
|
2014-10-24 12:36:19 +00:00
|
|
|
CONDITION HAVE_JPEG
|
2014-06-18 16:14:01 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jpeg.sh
|
|
|
|
RESOURCES include.sh
|
2015-03-10 15:52:33 +00:00
|
|
|
TEST_DEPENDS get_gribs
|
2014-06-18 16:14:01 +00:00
|
|
|
)
|
2014-08-28 09:11:51 +00:00
|
|
|
|
|
|
|
ecbuild_add_test( TARGET t_ccsds
|
|
|
|
TYPE SCRIPT
|
2014-10-24 12:36:19 +00:00
|
|
|
CONDITION HAVE_AEC
|
2014-08-28 09:11:51 +00:00
|
|
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ccsds.sh
|
|
|
|
RESOURCES include.sh
|
2015-03-10 15:52:33 +00:00
|
|
|
TEST_DEPENDS get_gribs
|
2014-08-28 09:11:51 +00:00
|
|
|
)
|
|
|
|
|