netcdf-c/ncdap_test/CMakeLists.txt

99 lines
3.0 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
# University Corporation for Atmospheric Research/Unidata.
# See netcdf-c/COPYRIGHT file for more info.
add_definitions(-D"TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR}/../")
add_definitions(-D"TOPBINDIR=${CMAKE_CURRENT_BINARY_DIR}/../")
2012-08-22 04:08:53 +08:00
remove_definitions(-DDLL_EXPORT)
# add_definitions(-D"TOPSRCDIR=${CMAKE_CURRENT_SOURCE_DIR}")
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/ref_pathcvt.txt)
2012-08-22 04:08:53 +08:00
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
2012-08-22 04:08:53 +08:00
IF(ENABLE_TESTS)
IF(ENABLE_DAP_REMOTE_TESTS)
BUILD_BIN_TEST(findtestserver)
BUILD_BIN_TEST(pingurl)
ENDIF()
IF(USE_X_GETOPT)
SET(XGSRC XGetopt.c)
ENDIF()
BUILD_BIN_TEST(pathcvt ${XGSRC})
# Base tests
# The tests are set up as a combination of shell scripts and executables that
# must be run in a particular order. It is painful but will use macros to help
# keep it from being too bad.
# Binary Test Macro
IF(BUILD_UTILITIES)
add_sh_test(ncdap tst_ncdap3)
add_sh_test(ncdap testpathcvt)
IF(HAVE_BASH)
SET_TESTS_PROPERTIES(ncdap_tst_ncdap3 PROPERTIES RUN_SERIAL TRUE)
2021-08-31 23:51:19 +08:00
SET_TESTS_PROPERTIES(ncdap_testpathcvt PROPERTIES RUN_SERIAL TRUE)
ENDIF(HAVE_BASH)
2021-08-31 23:51:19 +08:00
ENDIF()
IF(NOT MSVC)
add_bin_env_test(ncdap t_dap3a)
add_bin_env_test(ncdap test_cvt)
add_bin_env_test(ncdap test_vara)
ENDIF()
IF(ENABLE_DAP_REMOTE_TESTS)
Primary change: add dap4 support Specific changes: 1. Add dap4 code: libdap4 and dap4_test. Note that until the d4ts server problem is solved, dap4 is turned off. 2. Modify various files to support dap4 flags: configure.ac, Makefile.am, CMakeLists.txt, etc. 3. Add nc_test/test_common.sh. This centralizes the handling of the locations of various things in the build tree: e.g. where is ncgen.exe located. See nc_test/test_common.sh for details. 4. Modify .sh files to use test_common.sh 5. Obsolete separate oc2 by moving it to be part of netcdf-c. This means replacing code with netcdf-c equivalents. 5. Add --with-testserver to configure.ac to allow override of the servers to be used for --enable-dap-remote-tests. 6. There were multiple versions of nctypealignment code. Try to centralize in libdispatch/doffset.c and include/ncoffsets.h 7. Add a unit test for the ncuri code because of its complexity. 8. Move the findserver code out of libdispatch and into a separate, self contained program in ncdap_test and dap4_test. 9. Move the dispatch header files (nc{3,4}dispatch.h) to .../include because they are now shared by modules. 10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts. 11. Make use of MREMAP if available 12. Misc. minor changes e.g. - #include <config.h> -> #include "config.h" - Add some no-install headers to /include - extern -> EXTERNL and vice versa as needed - misc header cleanup - clean up checking for misc. unix vs microsoft functions 13. Change copyright decls in some files to point to LICENSE file. 14. Add notes to RELEASENOTES.md
2017-03-09 08:01:10 +08:00
IF(BUILD_UTILITIES)
2017-07-15 06:44:50 +08:00
add_sh_test(ncdap tst_ber)
add_sh_test(ncdap tst_remote3)
IF(HAVE_BASH)
SET_TESTS_PROPERTIES(ncdap_tst_remote3 PROPERTIES RUN_SERIAL TRUE)
ENDIF(HAVE_BASH)
add_sh_test(ncdap tst_zero_len_var)
add_sh_test(ncdap tst_encode)
# not yet add_sh_test(ncdap tst_hyrax)
add_sh_test(ncdap tst_fillmismatch)
IF(ENABLE_DAP_LONG_TESTS)
add_sh_test(ncdap tst_longremote3)
add_bin_test(ncdap test_manyurls)
SET_TESTS_PROPERTIES(ncdap_tst_longremote3 ncdap_test_manyurls PROPERTIES RUN_SERIAL TRUE)
ENDIF(ENABLE_DAP_LONG_TESTS)
ENDIF(BUILD_UTILITIES)
IF(ENABLE_DAP_AUTH_TESTS)
##obsolete add_bin_test(ncdap t_auth)
2015-01-01 13:53:03 +08:00
add_sh_test(ncdap testauth)
ENDIF()
add_bin_test(ncdap test_varm3)
add_bin_test(ncdap test_nstride_cached)
###
# This test relates to NCF-330 in
# the Unidata JIRA system.
###
#add_bin_test(ncdap t_ncf330)
ENDIF()
2012-08-22 04:08:53 +08:00
ENDIF()
ADD_SUBDIRECTORY(testdata3)
ADD_SUBDIRECTORY(expected3)
ADD_SUBDIRECTORY(expectremote3)
## Specify files to be distributed by 'make dist'
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} findtestserver.c.in CMakeLists.txt Makefile.am)
2013-11-16 04:44:27 +08:00
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")