netcdf-c/nc_test4/CMakeLists.txt

107 lines
3.5 KiB
CMake
Raw Normal View History

# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
# 2015, 2016, 2017, 2018, 2019
# University Corporation for Atmospheric Research/Unidata.
# See netcdf-c/COPYRIGHT file for more info.
# This is the cmake build file for the nc_test4 directory.
# Ward Fisher, Ed Hartnett
# Some extra tests
SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4
tst_vars tst_varms tst_unlim_vars tst_converts tst_converts2
tst_grps tst_grps2 tst_compounds tst_compounds2 tst_compounds3
tst_opaques tst_strings tst_strings2 tst_interops tst_interops4
tst_interops6 tst_interops_dims tst_enums tst_coords tst_coords2 tst_coords3 tst_vars3
tst_vars4 tst_chunks tst_chunks2 tst_utf8 tst_fills tst_fills2
tst_fillbug tst_xplatform2 tst_endian_fill tst_atts t_type
cdm_sea_soundings tst_vl tst_atts1 tst_atts2 tst_vars2 tst_files5
tst_files6 tst_sync tst_h_strbug tst_h_refs tst_h_scalar tst_rename
tst_rename2 tst_rename3 tst_h5_endians tst_atts_string_rewrite tst_put_vars_two_unlim_dim
2018-04-23 17:19:11 +08:00
tst_hdf5_file_compat tst_fill_attr_vanish tst_rehash tst_types tst_bug324
2021-04-17 08:54:35 +08:00
tst_atts3 tst_put_vars tst_elatefill tst_udf tst_bug1442)
2017-11-14 02:15:02 +08:00
# Note, renamegroup needs to be compiled before run_grp_rename
IF(BUILD_UTILITIES)
SET(NC4_TESTS ${NC4_TESTS} tst_xplatform)
build_bin_test(renamegroup)
add_sh_test(nc_test4 run_grp_rename)
2021-04-17 08:54:35 +08:00
build_bin_test(tst_charvlenbug)
ADD_SH_TEST(nc_test4 tst_misc)
build_bin_test(tst_fillonly)
ADD_SH_TEST(nc_test4 test_fillonly)
IF(ENABLE_FILTER_TESTING)
build_bin_test(tst_filterparser)
build_bin_test(test_filter)
build_bin_test(test_filter_misc)
Add support for multiple filters per variable. re: https://github.com/Unidata/netcdf-c/issues/1584 Support has been added for multiple filters per variable. This affects a number of components in netcdf. The new APIs are documented in NUG/filters.md. The primary changes are: * A set of new functions are provided (see __include/netcdf_filter.h__). - Obtain a list of the filters associated with a variable - Obtain the parameters for a specific filter. * The existing __nc_inq_var_filter__ function now returns info about the first defined filter. * The utilities (ncgen, ncdump, and nccopy) now support an extended format for specifying a sequence of filters. The general form is __<filter>|<filter>..._. * The ncdump **_Filter** attribute now dumps a list of all the filters associated with a variable using the above new format. * Filter specifications can now use a filter name instead of number for filters known to the netcdf library, which in turn is taken from the HDF5 filter registration page. * New errors are defined: NC_EFILTER and NC_ENOFILTER. The latter is returned if an attempt is made to access an unknown filter. * Internally, the dispatch table has been extended to add a function to handle all of the filter functions. * New, filter-related, tests were added to nc_test4. * A new plugin was added to the plugins directory to help with testing. Notes: 1. The shuffle and fletcher32 filters are not part of the multifilter system. Misc. changes: 1. A debug module was added to libhdf5 to help catch error locations.
2020-02-17 03:59:33 +08:00
build_bin_test(tst_multifilter)
build_bin_test(test_filter_order)
build_bin_test(test_filter_repeat)
ADD_SH_TEST(nc_test4 tst_filter)
IF(ENABLE_CLIENTSIDE_FILTERS)
add_bin_test(nc_test4 test_filter_reg)
ENDIF(ENABLE_CLIENTSIDE_FILTERS)
2018-01-24 08:18:53 +08:00
ENDIF(ENABLE_FILTER_TESTING)
ENDIF(BUILD_UTILITIES)
IF(${HDF5_VERSION} VERSION_GREATER "1.10.0")
SET(NC4_TESTS ${NC4_TESTS} tst_virtual_datasets)
ENDIF(${HDF5_VERSION} VERSION_GREATER "1.10.0")
##
# The shell script, run_empty_vlen_test.sh,
# depends on the 'tst_empty_vlen_unlim' binary.
##
BUILD_BIN_TEST(tst_empty_vlen_unlim)
ADD_SH_TEST(nc_test4 run_empty_vlen_test)
2012-09-15 05:35:25 +08:00
IF(NOT MSVC)
SET(NC4_TESTS ${NC4_TESTS} tst_interops5 tst_camrun)
2012-09-15 05:35:25 +08:00
ENDIF()
# If the v2 API was built, add the test program.
IF(ENABLE_V2_API)
build_bin_test(tst_v2)
ENDIF()
IF(LARGE_FILE_TESTS)
SET(NC4_TESTS ${NC4_TESTS} tst_large tst_large2)
ENDIF()
2017-08-28 05:51:45 +08:00
IF(USE_SZIP)
BUILD_BIN_TEST(test_szip)
BUILD_BIN_TEST(h5testszip)
IF(BUILD_UTILITIES)
add_sh_test(nc_test4 tst_szip)
ENDIF()
2017-08-28 05:51:45 +08:00
ENDIF()
2012-08-08 04:21:44 +08:00
# Copy some test files from current source dir to out-of-tree build dir.
2018-03-05 20:03:46 +08:00
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/ref_bzip2.c ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.h5 ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
IF(MSVC)
FILE(COPY ${COPY_FILES} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/)
ENDIF()
FOREACH(CTEST ${NC4_TESTS})
2012-09-15 05:53:08 +08:00
add_bin_test(nc_test4 ${CTEST})
ENDFOREACH()
IF(TEST_PARALLEL4)
build_bin_test(tst_mpi_parallel)
build_bin_test(tst_parallel)
build_bin_test(tst_parallel3)
build_bin_test(tst_parallel4)
2018-05-14 22:11:32 +08:00
build_bin_test(tst_parallel5)
build_bin_test(tst_parallel_zlib)
build_bin_test(tst_parallel_compress)
build_bin_test(tst_nc4perf)
2016-02-05 03:12:15 +08:00
build_bin_test(tst_mode)
2016-06-10 01:26:06 +08:00
build_bin_test(tst_simplerw_coll_r)
add_sh_test(nc_test4 run_par_test)
ENDIF()