mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
enforce --disable-dap-remote-tests
This commit is contained in:
parent
9bc3bd538c
commit
80e693a444
@ -466,6 +466,10 @@ fi
|
||||
|
||||
if test "x$enable_dap" = xyes; then
|
||||
AC_DEFINE([USE_DAP], [1], [if true, build DAP Client])
|
||||
AC_DEFINE([ENABLE_DAP], [1], [if true, build DAP Client])
|
||||
fi
|
||||
if test "x$enable_dap_remote_tests" = xyes; then
|
||||
AC_DEFINE([ENABLE_DAP_REMOTE_TESTS], [1], [if true, do remote tests])
|
||||
fi
|
||||
|
||||
# Default is now to always do the short remote tests
|
||||
@ -479,6 +483,7 @@ if test "x$enable_dap" = "xno" ; then
|
||||
fi
|
||||
AC_MSG_RESULT($enable_dap_remote_tests)
|
||||
|
||||
|
||||
AC_MSG_CHECKING([whether the time-consuming dap tests should be enabled (default off)])
|
||||
AC_ARG_ENABLE([dap-long-tests],
|
||||
[AS_HELP_STRING([--enable-dap-long-tests],
|
||||
|
@ -83,12 +83,11 @@ LDADD += @EXTERN_LDFLAGS@
|
||||
|
||||
# Add a trivial test case to check for undefined references
|
||||
check_PROGRAMS = t_dap
|
||||
TESTS_ENVIRONMENT=TOPSRCDIR=${abs_top_srcdir}
|
||||
TESTS = t_dap
|
||||
t_dap_SOURCES = t_dap.c stubdap3.c
|
||||
t_dap_LDFLAGS = ${top_builddir}/libsrc/libnetcdf3.la \
|
||||
${top_builddir}/libdispatch/libdispatch.la
|
||||
|
||||
|
||||
CLEANFILES += t_dap
|
||||
|
||||
EXTRA_DIST = ce.y
|
||||
|
@ -109,13 +109,33 @@ int main()
|
||||
{
|
||||
int ncid, varid, ncstat, i, j;
|
||||
char* url;
|
||||
char* topsrcdir;
|
||||
size_t len;
|
||||
|
||||
/* location of our target url*/
|
||||
/* location of our target url: use file// to avoid remote
|
||||
server downtime issues
|
||||
*/
|
||||
|
||||
/* Assume that TESTS_ENVIRONMENT was set */
|
||||
topsrcdir = getenv("TOPSRCDIR");
|
||||
if(topsrcdir == NULL) {
|
||||
fprintf(stderr,"*** FAIL: $abs_top_srcdir not defined: location= %s:%d\n",__FILE__,__LINE__);
|
||||
exit(1);
|
||||
}
|
||||
len = strlen("file://") + strlen(topsrcdir) + strlen("/ncdap_test/testdata3/test.02") + 1;
|
||||
#ifdef DEBUG
|
||||
url = "[log][show=fetch]http://test.opendap.org:8080/dods/dts/test.02";
|
||||
#else
|
||||
url = "http://test.opendap.org:8080/dods/dts/test.02";
|
||||
len += strlen("[log][show=fetch]");
|
||||
#endif
|
||||
url = (char*)malloc(len);
|
||||
url[0] = '\0';
|
||||
|
||||
#ifdef DEBUG
|
||||
strcat(url,"[log][show=fetch]");
|
||||
#endif
|
||||
|
||||
strcat(url,"file://");
|
||||
strcat(url,topsrcdir);
|
||||
strcat(url,"/ncdap_test/testdata3/test.02");
|
||||
|
||||
printf("*** Test: var conversions on URL: %s\n",url);
|
||||
|
||||
|
@ -59,6 +59,7 @@ LDADD += @EXTERN_LDFLAGS@
|
||||
|
||||
# Add a trivial test case to check for undefined references
|
||||
check_PROGRAMS = t_dap
|
||||
TESTS_ENVIRONMENT=TOPSRCDIR=${abs_top_srcdir}
|
||||
TESTS = t_dap
|
||||
t_dap_SOURCES = t_dap.c stubdap4.c
|
||||
CLEANFILES += t_dap
|
||||
|
@ -123,16 +123,37 @@ int main()
|
||||
{
|
||||
int ncid, varid, ncstat;
|
||||
char* url;
|
||||
char* topsrcdir;
|
||||
size_t len;
|
||||
|
||||
#ifndef USE_NETCDF4
|
||||
int j;
|
||||
#endif
|
||||
|
||||
/* location of our target url*/
|
||||
/* location of our target url: use file// to avoid remote
|
||||
server downtime issues
|
||||
*/
|
||||
|
||||
/* Assume that TESTS_ENVIRONMENT was set */
|
||||
topsrcdir = getenv("TOPSRCDIR");
|
||||
if(topsrcdir == NULL) {
|
||||
fprintf(stderr,"*** FAIL: $abs_top_srcdir not defined: location= %s:%d\n",__FILE__,__LINE__);
|
||||
exit(1);
|
||||
}
|
||||
len = strlen("file://") + strlen(topsrcdir) + strlen("/ncdap_test/testdata3/test.02") + 1;
|
||||
#ifdef DEBUG
|
||||
url = "[log][show=fetch]http://test.opendap.org:8080/dods/dts/test.02";
|
||||
#else
|
||||
url = "http://test.opendap.org:8080/dods/dts/test.02";
|
||||
len += strlen("[log][show=fetch]");
|
||||
#endif
|
||||
url = (char*)malloc(len);
|
||||
url[0] = '\0';
|
||||
|
||||
#ifdef DEBUG
|
||||
strcat(url,"[log][show=fetch]");
|
||||
#endif
|
||||
|
||||
strcat(url,"file://");
|
||||
strcat(url,topsrcdir);
|
||||
strcat(url,"/ncdap_test/testdata3/test.02");
|
||||
|
||||
printf("*** Test: var conversions on URL: %s\n",url);
|
||||
|
||||
|
@ -15,6 +15,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
printf("\n*** Testing netcdf file functions some more.\n");
|
||||
#ifdef USE_DAP
|
||||
#ifdef ENABLE_DAP_REMOTE_TESTS
|
||||
printf("*** testing simple opendap open/close...");
|
||||
{
|
||||
int ncid;
|
||||
@ -24,6 +25,7 @@ main(int argc, char **argv)
|
||||
if (nc_close(ncid)) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
#endif /*ENABLE_DAP_REMOTE_TESTS*/
|
||||
#endif /* USE_DAP */
|
||||
FINAL_RESULTS;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user