mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Added new tests, CMake functionality.
This commit is contained in:
parent
8f9120e3a9
commit
58035ff8f2
@ -198,6 +198,10 @@ IF (ENABLE_DAP)
|
||||
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS})
|
||||
ENDIF()
|
||||
|
||||
# Option to Enable DAP long tests, remote tests.
|
||||
OPTION(ENABLE_DAP_LONG_TESTS "Enable DAP long tests." OFF)
|
||||
OPTION(ENABLE_DAP_REMOTE_TESTS "Enable DAP remote tests." ON)
|
||||
|
||||
# If NetCDF4 and DAP, Option for DAP groups.
|
||||
IF(ENABLE_NETCDF4 AND USE_DAP)
|
||||
OPTION(ENABLE_DAP_GROUPS "Whether netcdf4 group names should be enabled." ON)
|
||||
@ -276,7 +280,7 @@ ENDIF()
|
||||
|
||||
# Set some of the options as advanced.
|
||||
MARK_AS_ADVANCED(ENABLE_INTERNAL_DOCS VALGRIND_TESTS ENABLE_PNETCDF BUILD_CDMREMOTE ENABLE_COVERAGE_TESTS)
|
||||
|
||||
MARK_AS_ADVANCED(ENABLE_DAP_REMOTE_TESTS ENABLE_DAP_LONG_TESTS)
|
||||
#####
|
||||
# End option checks.
|
||||
#####
|
||||
@ -434,6 +438,9 @@ IF(ENABLE_TESTS)
|
||||
ADD_SUBDIRECTORY(nc_test4)
|
||||
ADD_SUBDIRECTORY(h5_test)
|
||||
ENDIF()
|
||||
IF(USE_DAP)
|
||||
ADD_SUBDIRECTORY(ncdap_test)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#####
|
||||
|
@ -24,6 +24,7 @@
|
||||
#cmakedefine ENABLE_INTERNAL_DOCS 1
|
||||
#cmakedefine VALGRIND_TESTS 1
|
||||
#cmakedefine ENABLE_CDMREMOTE 1
|
||||
#cmakedefine USE_DAP 1
|
||||
#cmakedefine ENABLE_DAP 1
|
||||
#cmakedefine ENABLE_DAP_GROUPS 1
|
||||
#cmakedefine ENABLE_DAP_REMOTE_TESTS 1
|
||||
|
@ -2,7 +2,7 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
|
||||
SET(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c dstring.c dutf8proc.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c dsubstrate.c)
|
||||
SET(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8proc.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c dsubstrate.c)
|
||||
|
||||
IF(USE_NETCDF4)
|
||||
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dgroup.c dvlen.c dcompound.c dtype.c denum.c dopaque.c ncaux.c)
|
||||
|
53
ncdap_test/CMakeLists.txt
Normal file
53
ncdap_test/CMakeLists.txt
Normal file
@ -0,0 +1,53 @@
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
INCLUDE_DIRECTORIES(".")
|
||||
|
||||
|
||||
SET(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
remove_definitions(-DDLL_EXPORT)
|
||||
|
||||
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/testdata3 ${CMAKE_CURRENT_SOURCE_DIR}/expected3 ${CMAKE_CURRENT_SOURCE_DIR}/expected4 ${CMAKE_CURRENT_SOURCE_DIR}/expectremote3 ${CMAKE_CURRENT_SOURCE_DIR}/expectremote4 ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
|
||||
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
|
||||
|
||||
ADD_EXECUTABLE(nctestserver nctestserver.c)
|
||||
TARGET_LINK_LIBRARIES(nctestserver netcdf ${ALL_TLL_LIBS})
|
||||
|
||||
IF(ENABLE_TESTS)
|
||||
# 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
|
||||
MACRO(add_bin_test F)
|
||||
ADD_EXECUTABLE(ncdap_${F} ${F}.c)
|
||||
TARGET_LINK_LIBRARIES(ncdap_${F} netcdf)
|
||||
ADD_TEST(ncdap_${F} ${EXECUTABLE_OUTPUT_PATH}/ncdap_${F})
|
||||
|
||||
ENDMACRO()
|
||||
|
||||
# Shell script Macro
|
||||
MACRO(add_sh_test F)
|
||||
ADD_TEST(ncdap_${F} sh ${CMAKE_CURRENT_BINARY_DIR}/${F}.sh)
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
add_sh_test(tst_ncdap3)
|
||||
|
||||
IF(ENABLE_DAP_REMOTE_TESTS)
|
||||
add_sh_test(tst_remote3)
|
||||
ENDIF()
|
||||
|
||||
IF(ENABLE_DAP_LONG_TESTS)
|
||||
add_sh_test(tst_longremote3)
|
||||
ENDIF()
|
||||
|
||||
add_bin_test(t_dap3a)
|
||||
add_bin_test(test_cvt)
|
||||
add_bin_test(test_vara)
|
||||
add_bin_test(test_partvar)
|
||||
add_bin_test(test_varm3)
|
||||
|
||||
ENDIF()
|
||||
|
@ -20,8 +20,8 @@ ADD_CUSTOM_COMMAND(
|
||||
)
|
||||
#ENDIF()
|
||||
|
||||
SET(ncdump_FILES ncdump.c utils.c vardata.c dumplib.c indent.c nctime0.c )
|
||||
SET(nccopy_FILES nccopy.c utils.c nciter.c chunkspec.c utils.c dimmap.c)
|
||||
SET(ncdump_FILES ncdump.c vardata.c dumplib.c indent.c nctime0.c utils.c nciter.c)
|
||||
SET(nccopy_FILES nccopy.c nciter.c chunkspec.c utils.c dimmap.c)
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.6.2. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -31,6 +30,15 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef NCG_NCGEN_TAB_H
|
||||
# define NCG_NCGEN_TAB_H
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int ncgdebug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -62,7 +70,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -72,4 +79,18 @@ typedef int YYSTYPE;
|
||||
|
||||
extern YYSTYPE ncglval;
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int ncgparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int ncgparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int ncgparse (void);
|
||||
#else
|
||||
int ncgparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !NCG_NCGEN_TAB_H */
|
||||
|
Loading…
Reference in New Issue
Block a user