-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ncpyfilter.dmh
- Loading branch information
Showing
20 changed files
with
134 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copy some test files from current source dir to out-of-tree build dir. | ||
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.hdf4) | ||
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/) | ||
IF(MSVC) | ||
FILE(COPY ${COPY_FILES} DESTINATION ${RUNTIME_OUTPUT_DIRECTORY}/) | ||
ENDIF() | ||
|
||
IF(USE_HDF4_FILE_TESTS AND NOT MSVC) | ||
build_bin_test_no_prefix(tst_interops2) | ||
build_bin_test_no_prefix(tst_interops3) | ||
add_bin_test(hdf4_test tst_chunk_hdf4) | ||
add_bin_test(hdf4_test tst_h4_lendian) | ||
add_sh_test(hdf4_test run_get_hdf4_files) | ||
add_sh_test(hdf4_test run_formatx_hdf4) | ||
ENDIF() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This is part of the netCDF package. | ||
# Copyright 2018 University Corporation for Atmospheric Research/Unidata | ||
# See COPYRIGHT file for conditions of use. | ||
# | ||
# This directory has tests for the HDF4 code. This directory will be | ||
# skipped if HDF4 is not enabled. | ||
# | ||
# Ed Hartnett | ||
|
||
# Put together AM_CPPFLAGS and AM_LDFLAGS. | ||
include $(top_srcdir)/lib_flags.am | ||
|
||
# Link to our assembled library. | ||
AM_LDFLAGS += ${top_builddir}/liblib/libnetcdf.la | ||
|
||
# These are the C tests for HDF4. | ||
check_PROGRAMS = tst_chunk_hdf4 tst_h4_lendian | ||
TESTS = tst_chunk_hdf4 tst_h4_lendian | ||
|
||
# This test script depends on ncdump and tst_interops2.c. | ||
if BUILD_UTILITIES | ||
check_PROGRAMS += tst_interops2 | ||
TESTS += run_formatx_hdf4.sh | ||
endif # BUILD_UTILITIES | ||
|
||
# This test script fetches HDF4 files from an FTP server and uses | ||
# program tst_interops3.c to read them. | ||
if USE_HDF4_FILE_TESTS | ||
check_PROGRAMS += tst_interops3 | ||
TESTS += run_get_hdf4_files.sh | ||
endif # USE_HDF4_FILE_TESTS | ||
|
||
EXTRA_DIST = CMakeLists.txt ref_contiguous.hdf4 ref_chunked.hdf4 \ | ||
run_get_hdf4_files.sh run_formatx_hdf4.sh | ||
|
||
CLEANFILES = *.h4 *.hdf | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/sh | ||
|
||
# This shell script runs tst_interops2 to create a HDF4 file, and read | ||
# it with netCDF. Then the script runs ncdump on the HDF4 file. | ||
|
||
# Ed Hartnett | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
FILE=tst_interops2.h4 | ||
|
||
ECODE=0 | ||
|
||
echo "" | ||
echo "*** Testing extended file format output." | ||
set -e | ||
|
||
echo "Creating HDF4 file" | ||
${execdir}/tst_interops2 | ||
|
||
echo "Test extended format output for a HDF4 file" | ||
rm -f tmp_tst_formatx_hdf4 | ||
${NCDUMP} -K $FILE >tmp_tst_formatx_hdf4 | ||
if ! fgrep 'HDF4 mode=00001000' <tmp_tst_formatx_hdf4 ; then | ||
TMP=`cat tmp_tst_formatx_hdf4` | ||
echo "*** Fail: extended format for an HDF4 file: result=" $TMP | ||
ECODE=1 | ||
fi | ||
|
||
rm -f tmp_tst_formatx_hdf4 | ||
|
||
# Exit if there was a failure. | ||
if test $ECODE = 1 ; then | ||
exit $ECODE | ||
fi | ||
|
||
echo "" | ||
echo "*** Testing reading an individual variable from an HDF4 file." | ||
|
||
${NCDUMP} -v hdf4_dataset_type_0 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_1 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_2 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_3 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_4 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_5 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_6 $FILE | ||
${NCDUMP} -v hdf4_dataset_type_7 $FILE | ||
|
||
echo "*** Success." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.