mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Merge branch 'master' into v4.6.2.1-dev.wif
This commit is contained in:
commit
0098f4c9f1
@ -22,6 +22,12 @@ FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
|
||||
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
|
||||
|
||||
IF(ENABLE_DAP_REMOTE_TESTS)
|
||||
# Change name (add '4') to avoid cmake
|
||||
# complaint about duplicate targets.
|
||||
BUILD_BIN_TEST(findtestserver4)
|
||||
ENDIF()
|
||||
|
||||
IF(ENABLE_TESTS)
|
||||
|
||||
# Base tests
|
||||
@ -35,10 +41,6 @@ IF(ENABLE_TESTS)
|
||||
|
||||
IF(ENABLE_DAP_REMOTE_TESTS)
|
||||
|
||||
# Change name (add '4') to avoid cmake
|
||||
# complaint about duplicate targets.
|
||||
BUILD_BIN_TEST(findtestserver4)
|
||||
|
||||
IF(BUILD_UTILITIES)
|
||||
#add_sh_test(dap4_test test_remote)
|
||||
ENDIF(BUILD_UTILITIES)
|
||||
|
@ -46,8 +46,11 @@ test_data.log: test_meta.log
|
||||
if ENABLE_DAP_REMOTE_TESTS
|
||||
# Note: This program name was changed to findtestserver4
|
||||
# to avoid cmake complaint about duplicate targets.
|
||||
check_PROGRAMS += findtestserver4
|
||||
noinst_PROGRAMS = findtestserver4
|
||||
findtestserver4_SOURCES = findtestserver4.c
|
||||
endif
|
||||
|
||||
if ENABLE_DAP_REMOTE_TESTS
|
||||
if BUILD_UTILITIES
|
||||
# relies on ncdump
|
||||
TESTS += test_remote.sh
|
||||
|
@ -21,6 +21,7 @@ See \ref copyright file for more info.
|
||||
#define MAXSERVERURL 4096
|
||||
#define TIMEOUT 10 /*seconds*/
|
||||
#define BUFSIZE 8192 /*bytes*/
|
||||
#define MAXREMOTETESTSERVERS 4096
|
||||
|
||||
#ifndef HAVE_CURLINFO_RESPONSE_CODE
|
||||
#define CURLINFO_RESPONSE_CODE CURLINFO_HTTP_CODE
|
||||
@ -37,8 +38,11 @@ parseServers(const char* remotetestservers)
|
||||
char* p;
|
||||
char* svc;
|
||||
char** l;
|
||||
size_t rtslen = strlen(remotetestservers);
|
||||
|
||||
list = (char**)malloc(sizeof(char*) * (int)(strlen(remotetestservers)/2));
|
||||
/* Keep LGTM quiet */
|
||||
if(rtslen > MAXREMOTETESTSERVERS) goto done;
|
||||
list = (char**)malloc(sizeof(char*) * (int)(rtslen/2));
|
||||
if(list == NULL) return NULL;
|
||||
rts = strdup(remotetestservers);
|
||||
if(rts == NULL) goto done;
|
||||
|
@ -93,9 +93,13 @@ main()
|
||||
size_t count[RANK];
|
||||
char URL[4096];
|
||||
const char* svc = NULL;
|
||||
const char* testservers = "";
|
||||
|
||||
#ifdef REMOTETESTSERVERS
|
||||
testservers = REMOTETESTSERVERS;
|
||||
#endif
|
||||
/* Find Test Server */
|
||||
svc = nc_findtestserver("dts",0);
|
||||
svc = nc_findtestserver("dts",0,testservers);
|
||||
if(svc == NULL) {
|
||||
fprintf(stderr,"Cannot locate test server\n");
|
||||
exit(1);
|
||||
|
@ -830,7 +830,11 @@ convertString(union ATOMICS* converter, NCD4node* type, const char* s)
|
||||
if(sscanf(s,"%lf",&converter->f64[0]) != 1) return THROW(NC_ERANGE);
|
||||
break;
|
||||
case NC_CHAR:
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
converter->i8[7] = s[0];
|
||||
#else
|
||||
converter->i8[0] = s[0];
|
||||
#endif
|
||||
break;
|
||||
case NC_STRING:
|
||||
converter->s[0]= strdup(s);
|
||||
|
@ -14,6 +14,11 @@ FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
|
||||
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
|
||||
|
||||
|
||||
IF(ENABLE_DAP_REMOTE_TESTS)
|
||||
BUILD_BIN_TEST(findtestserver)
|
||||
ENDIF()
|
||||
|
||||
IF(ENABLE_TESTS)
|
||||
# Base tests
|
||||
# The tests are set up as a combination of shell scripts and executables that
|
||||
@ -31,8 +36,6 @@ IF(ENABLE_TESTS)
|
||||
|
||||
IF(ENABLE_DAP_REMOTE_TESTS)
|
||||
|
||||
BUILD_BIN_TEST(findtestserver)
|
||||
|
||||
IF(BUILD_UTILITIES)
|
||||
add_sh_test(ncdap tst_ber)
|
||||
add_sh_test(ncdap tst_remote3)
|
||||
|
@ -38,9 +38,11 @@ endif
|
||||
# because the server may be down or inaccessible
|
||||
|
||||
if ENABLE_DAP_REMOTE_TESTS
|
||||
check_PROGRAMS += findtestserver
|
||||
noinst_PROGRAMS = findtestserver
|
||||
findtestserver_SOURCES = findtestserver.c
|
||||
endif
|
||||
|
||||
if ENABLE_DAP_REMOTE_TESTS
|
||||
if BUILD_UTILITIES
|
||||
TESTS += tst_ber.sh tst_remote3.sh tst_formatx.sh testurl.sh tst_fillmismatch.sh tst_zero_len_var.sh
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user