Skip to content

Commit

Permalink
Examples/F90: Fix test names
Browse files Browse the repository at this point in the history
  • Loading branch information
shahramn committed Feb 26, 2025
1 parent d8fa39b commit bfa1800
Showing 1 changed file with 87 additions and 14 deletions.
101 changes: 87 additions & 14 deletions examples/F90/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,80 @@
# Configure the file which all CMake tests will include
configure_file( include.ctest.sh.in include.ctest.sh @ONLY )

list( APPEND test_bins
bufr_attributes
bufr_clone
bufr_copy_data
bufr_copy_keys
bufr_copy_message
bufr_ecc-1019
bufr_ecc-1284
bufr_expanded
bufr_get_keys
bufr_get_string_array
bufr_keys_iterator
bufr_read_header
bufr_read_scatterometer
bufr_read_synop
bufr_read_temp
bufr_read_tempf
bufr_read_tropical_cyclone
bufr_set_keys
bufr_subset
codes_datetime_julian
codes_dump
codes_ecc-1392
codes_f90_misc
codes_load_file
codes_scan_file
codes_set_paths
get_native_type
get_product_kind
grib_clone
grib_copy_message
grib_copy_namespace
grib_count_messages
grib_count_messages_multi
grib_ecc-1316
grib_ecc-671
grib_elements
grib_get_data
grib_get_data_real4
grib_get_keys
grib_get_pl
grib_get_pv
grib_get_set_uuid
grib_index
grib_keys_iterator
grib_keys_iterator_skip
grib_multi
grib_multi_write
grib_nearest
grib_nearest_four_single
grib_nearest_single
grib_precision
grib_print_data
grib_read_bytes
grib_read_from_file
grib_read_message
grib_samples
grib_sections_copy
grib_set_bitmap
grib_set_data
grib_set_data_force
grib_set_keys
grib_set_missing
grib_set_pv
key_is_computed)

foreach( tool ${test_bins} )
ecbuild_add_executable( TARGET f_${tool}
NOINSTALL
SOURCES ${tool}.f90
LINKER_LANGUAGE Fortran
CONDITION HAVE_FORTRAN
LIBS eccodes_f90 eccodes )
endforeach()

# Add all the tests
####################
Expand Down Expand Up @@ -122,10 +196,8 @@ else()
endif()

foreach( atest ${tests_sanity} )
ecbuild_add_test( TARGET f_${atest}
SOURCES ${atest}.f90
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes
ecbuild_add_test( TARGET eccodes_f_${atest}
TYPE SCRIPT
CONDITION HAVE_FORTRAN
LABELS "sanity"
RESOURCES bufr_read_scatterometer_f.ref
Expand All @@ -138,23 +210,24 @@ if( HAVE_BUILD_TOOLS AND NOT CMAKE_CXX_COMPILER_ID MATCHES NVHPC )
endif()

foreach( atest ${tests_extra} )
ecbuild_add_test( TARGET f_${atest}
SOURCES ${atest}.f90
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes
ecbuild_add_test( TARGET eccodes_f_${atest}
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
RESOURCES bufr_read_scatterometer_f.ref
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs eccodes_download_bufr_refs )
endforeach()

# Test for CCSDS (AEC) packing
ecbuild_add_test( TARGET f_grib_set_packing
SOURCES grib_set_packing.f90
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes
CONDITION HAVE_BUILD_TOOLS AND HAVE_AEC AND HAVE_FORTRAN
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
if( HAVE_BUILD_TOOLS AND HAVE_AEC AND HAVE_FORTRAN )
ecbuild_add_executable( TARGET f_grib_set_packing
NOINSTALL
SOURCES grib_set_packing.f90
LINKER_LANGUAGE Fortran
LIBS eccodes_f90 eccodes )

ecbuild_add_test( TARGET eccodes_f_grib_set_packing
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
endif()

# Executables without a shell script
#ecbuild_add_executable( TARGET f_new_from_file
Expand Down

0 comments on commit bfa1800

Please sign in to comment.