Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DAP4 remotetest server #2558

Merged
merged 27 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ ENDIF()
IF(ENABLE_DAP)
SET(USE_DAP ON CACHE BOOL "")
SET(ENABLE_DAP2 ON CACHE BOOL "")

IF(ENABLE_HDF5)
MESSAGE(STATUS "Enabling DAP4")
SET(ENABLE_DAP4 ON CACHE BOOL "")
Expand Down Expand Up @@ -1261,6 +1261,8 @@ IF(MSVC)
DESTINATION ${netCDF_BINARY_DIR}/nczarr_test/)
FILE(COPY ${netCDF_SOURCE_DIR}/libsrc/XGetopt.c
DESTINATION ${netCDF_BINARY_DIR}/ncdap_test/)
FILE(COPY ${netCDF_SOURCE_DIR}/libsrc/XGetopt.c
DESTINATION ${netCDF_BINARY_DIR}/dap4_test/)
ENDIF()
ENDIF()

Expand Down
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ This file contains a high-level description of this package's evolution. Release

#### Changes

* [Bug Fix] Get remotetest server working for DAP4 and re-enable its use in the netcdf-c library for testing. See [Github #2558](https://github.com/Unidata/netcdf-c/pull/2558).
* [Bug Fix] Fix a race condition when testing missing filters. See [Github #2557](https://github.com/Unidata/netcdf-c/pull/2557).
* [Bug Fix] Make major changes to libdap4 and dap4_test to update the non-remote DAP4 tests. See [Github #2555](https://github.com/Unidata/netcdf-c/pull/2555).
* [Bug Fix] Fix some race conditions due to use of a common file in multiple shell scripts . See [Github #2552](https://github.com/Unidata/netcdf-c/pull/2552).


Expand Down
24 changes: 10 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -614,21 +614,14 @@ AC_MSG_CHECKING([whether dap use of remotetest server should be enabled])
AC_ARG_ENABLE([dap-remote-tests],
[AS_HELP_STRING([--disable-dap-remote-tests],
[disable dap remote tests])])
# Default off
test "x$enable_dap_remote_tests" = xyes || enable_dap_remote_tests=no
# Default on
test "x$enable_dap_remote_tests" = xno || enable_dap_remote_tests=yes
if test "x$enable_dap" = "xno" ; then
enable_dap_remote_tests=no
fi
AC_MSG_RESULT($enable_dap_remote_tests)

AC_MSG_CHECKING([whether dap use of remotetest server should be enabled])
AC_ARG_ENABLE([dap-remote-tests],
[AS_HELP_STRING([--disable-dap-remote-tests],
[disable dap remote tests])])
test "x$enable_dap_remote_tests" = xno || enable_dap_remote_tests=yes
AC_MSG_RESULT($enable_dap_remote_tests)

AC_MSG_CHECKING([whether use of external servers should be enabled])
AC_MSG_CHECKING([whether use of external (non-unidata) servers should be enabled])
AC_ARG_ENABLE([external-server-tests],
[AS_HELP_STRING([--enable-external-server-tests (default off)],
[enable external server tests])])
Expand Down Expand Up @@ -663,12 +656,15 @@ AC_ARG_WITH([testservers],
[AS_HELP_STRING([--with-testservers=<host:port>,<host:port>...],
[Specify the testserver(s) to try for remote tests.])],
[REMOTETESTSERVERS=$with_testservers], [REMOTETESTSERVERS=no])
msg="$REMOTETESTSERVERS"
if test "x$REMOTETESTSERVERS" = xno ; then
svclist="remotetest.unidata.ucar.edu"
REMOTETESTSERVERS="$svclist"
dfaltsvc="remotetest.unidata.ucar.edu"
REMOTETESTSERVERS="${dfaltsvc}"
fi
msg="${REMOTETESTSERVERS}"
if test "x$dfaltsvc" != x ; then
msg="${msg} (default)"
fi
AC_MSG_RESULT([$svclist])
AC_MSG_RESULT([${msg}])
AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers for remote tests.])

# Set the config.h flags
Expand Down
36 changes: 19 additions & 17 deletions dap4_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ ADD_SUBDIRECTORY(baselineremote)
ADD_SUBDIRECTORY(baselinehyrax)
ADD_SUBDIRECTORY(baselinethredds)
ADD_SUBDIRECTORY(cdltestfiles)
ADD_SUBDIRECTORY(daptestfiles)
ADD_SUBDIRECTORY(dmrtestfiles)
ADD_SUBDIRECTORY(nctestfiles)
ADD_SUBDIRECTORY(misctestfiles)
ADD_SUBDIRECTORY(rawtestfiles)

FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)

Expand All @@ -39,41 +36,46 @@ IF(ENABLE_TESTS)
# keep it from being too bad.

IF(BUILD_UTILITIES)
add_sh_test(dap4_test test_fillmismatch)

# Following tests are Unit tests, so not tested under visual studio
IF(NOT MSVC)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libdap4)
build_bin_test(test_parse)
build_bin_test(test_meta)
IF(USE_X_GETOPT)
build_bin_test(test_data XGetopt.c)
ELSE()
build_bin_test(test_data)
ENDIF()
add_sh_test(dap4_test test_parse)
add_sh_test(dap4_test test_raw)
add_sh_test(dap4_test test_meta)
add_sh_test(dap4_test test_data)
ENDIF()
ENDIF(BUILD_UTILITIES)

IF(ENABLE_DAP_REMOTE_TESTS)
add_sh_test(dap4_test test_remote)
add_sh_test(dap4_test test_hyrax)
add_sh_test(dap4_test test_thredds)
# add_sh_test(dap4_test test_thredds)
add_sh_test(dap4_test test_dap4url)
ENDIF(ENABLE_DAP_REMOTE_TESTS)

ENDIF(ENABLE_TESTS)

FILE(COPY ./baselineraw DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baseline DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baselineraw DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baselineremote DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baselinethredds DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baselinehyrax DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./cdltestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./daptestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./dmrtestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./rawtestfiles DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})

## 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
#${CMAKE_CURRENT_SOURCE_DIR}/daptestfiles
#${CMAKE_CURRENT_SOURCE_DIR}/dmrtestfiles
#${CMAKE_CURRENT_SOURCE_DIR}/cdltestfiles
#${CMAKE_CURRENT_SOURCE_DIR}/baseline
${CMAKE_CURRENT_SOURCE_DIR}/cdltestfiles
${CMAKE_CURRENT_SOURCE_DIR}/rawtestfiles
${CMAKE_CURRENT_SOURCE_DIR}/baseline
${CMAKE_CURRENT_SOURCE_DIR}/baselineraw
${CMAKE_CURRENT_SOURCE_DIR}/baselineremote
#${CMAKE_CURRENT_SOURCE_DIR}/baselinerthredds
${CMAKE_CURRENT_SOURCE_DIR}/baselinehyrax
)
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
36 changes: 20 additions & 16 deletions dap4_test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,36 @@ check_PROGRAMS += test_parse test_meta test_data

noinst_PROGRAMS =

TESTS += test_parse.sh test_meta.sh test_data.sh test_fillmismatch.sh test_raw.sh
TESTS += test_parse.sh test_meta.sh test_data.sh test_raw.sh

# Note tst_curlopt.sh is intended to be run manually; see comments in file.
# Note test_curlopt.sh is intended to be run manually; see comments in file.

# Note: This program name was changed to findtestserver4
# to avoid cmake complaint about duplicate targets.
noinst_PROGRAMS += findtestserver4 pingurl4
noinst_PROGRAMS += findtestserver4 pingurl4 dump
findtestserver4_SOURCES = findtestserver4.c
pingurl4_SOURCES = pingurl4.c
dump_SOURCES = dump.c

# Disable Dap4 Remote Tests until the test server is working
if ENABLE_DAP_REMOTE_TESTS
if BUILD_UTILITIES
# relies on ncdump
TESTS += test_hyrax.sh
# TESTS += test_thredds.sh
if AX_IGNORE
TESTS += test_remote.sh
endif
if ENABLE_DAP_REMOTE_TESTS
TESTS += test_remote.sh
TESTS += test_constraints.sh
TESTS += test_hyrax.sh
#TESTS += test_thredds.sh
TESTS += test_dap4url.sh
endif
endif

EXTRA_DIST = test_parse.sh test_meta.sh test_data.sh \
test_raw.sh test_remote.sh test_hyrax.sh test_thredds.sh test_fillmismatch.sh \
tst_curlopt.sh d4test_common.sh \
daptestfiles dmrtestfiles cdltestfiles nctestfiles misctestfiles \
baseline baselineraw baselineremote baselinehyrax baselinethredds CMakeLists.txt test_common.h
EXTRA_DIST = CMakeLists.txt test_common.h build.sh \
d4manifest.sh d4test_common.sh \
test_curlopt.sh test_data.sh test_hyrax.sh test_meta.sh \
test_parse.sh test_raw.sh \
test_remote.sh test_constraints.sh test_thredds.sh \
test_dap4url.sh \
cdltestfiles rawtestfiles \
baseline baselineraw baselineremote baselinehyrax baselinethredds

CLEANFILES = *.exe
# This should only be left behind if using parallel io
Expand All @@ -81,8 +84,9 @@ clean-local-check:

# The shell file maketests.sh is used to build the testdata
# for dap4 testing. It creates and fills the directories
# daptestfiles, dmrtestfiles, and cdltestfiles
# daptestfiles, dmrtestfiles, and testsrc
# As a rule, this will only be invoked if there was a change
# in the GenerateRaw.java program in the thredds tree.
maketests::
bash ./maketests.sh

12 changes: 0 additions & 12 deletions dap4_test/baseline/test_anon_dim.2.syn.d4d

This file was deleted.

9 changes: 0 additions & 9 deletions dap4_test/baseline/test_anon_dim.2.syn.d4m

This file was deleted.

21 changes: 0 additions & 21 deletions dap4_test/baseline/test_anon_dim.2.syn.d4p

This file was deleted.

11 changes: 0 additions & 11 deletions dap4_test/baseline/test_anon_dim.syn.d4d

This file was deleted.

7 changes: 0 additions & 7 deletions dap4_test/baseline/test_anon_dim.syn.d4m

This file was deleted.

18 changes: 0 additions & 18 deletions dap4_test/baseline/test_anon_dim.syn.d4p

This file was deleted.

28 changes: 0 additions & 28 deletions dap4_test/baseline/test_atomic_array.5.nc.d4d

This file was deleted.

15 changes: 0 additions & 15 deletions dap4_test/baseline/test_atomic_array.5.nc.d4m

This file was deleted.

34 changes: 0 additions & 34 deletions dap4_test/baseline/test_atomic_array.5.nc.d4p

This file was deleted.

12 changes: 0 additions & 12 deletions dap4_test/baseline/test_atomic_array.8.nc.d4d

This file was deleted.

9 changes: 0 additions & 9 deletions dap4_test/baseline/test_atomic_array.8.nc.d4m

This file was deleted.

Loading