Clean up some ncdap tests.

This is in response to issue https://github.com/Unidata/netcdf-c/issues/2188#issuecomment-1072762308 although it does not fix that problem.
This commit is contained in:
Dennis Heimbigner 2022-03-18 21:01:40 -06:00
parent 526552034c
commit a83b7b9fe7
15 changed files with 21 additions and 67 deletions

View File

@ -1,29 +0,0 @@
name: NetCDF-Build MinGW
on: [workflow_dispatch,push]
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make mingw-w64-x86_64-hdf5 unzip
- name: CI-Build
shell: msys2 {0}
run: |
echo 'Running in MSYS2!'
set -e
pwd
git clone --single-branch --branch moreosfixes.tmp https://github.com/DennisHeimbigner/netcdf-c.git
cd netcdf-c
autoreconf -i --force
./configure --prefix=/builddir -enable-shared --disable-static --disable-plugins --disable-logging --disable-dap-remote-tests --disable-byterange
make -j LDFLAGS="-no-undefined -Wl,--export-all-symbols"
make check

View File

@ -7,7 +7,7 @@
name: Run MSYS2, MinGW64-based Tests
on: [ pull_request ]
on: [pull_request]
jobs:

View File

@ -1160,7 +1160,7 @@ check_file_type(const char *path, int omode, int use_parallel,
if((status = openmagic(&magicinfo))) goto done;
/* Verify we have a large enough file */
if(magicinfo.filelen < (long long)MAGIC_NUMBER_LEN)
if(magicinfo.filelen < (unsigned long long)MAGIC_NUMBER_LEN)
{status = NC_ENOTNC; goto done;}
if((status = readmagic(&magicinfo,0L,magic)) != NC_NOERR) {
status = NC_ENOTNC;

View File

@ -22,7 +22,11 @@ main() {
printf("\n*** Testing NetCDF-4 with truncated (broken) sample file.\n");
{
printf("*** testing via file on file-system ...\n");
FILE *fp = fopen(FILE_NAME, "w");
#if defined _WIN32 || defined __MINGW32__
FILE *fp = fopen(FILE_NAME, "wb");
#else
FILE *fp = fopen(FILE_NAME, "w");
#endif
if(!fp) ERR;
if(fwrite(TRUNCATED_FILE_CONTENT, sizeof(char), sizeof(TRUNCATED_FILE_CONTENT), fp) != sizeof(TRUNCATED_FILE_CONTENT)) ERR;
fclose(fp);

View File

@ -40,10 +40,7 @@ kwcase.nc"
# only to detect which are considered XFAIL tests.
XFAILTESTS=
# For now, remove some tests from windows platform.
#if test "x$platform" != xmingw ; then
XFAILTESTS="$XFAILTESTS EOSDB OverideExample SimpleDrdsExample test.67 test.gr5 123bears.nc 123.nc bears.nc ber-2002-10-01 data.nc in1.nc in_2.nc in_no_three_double_dmn.nc test.nc text.nc test.22 test.23 test.gr1 in.nc ber-2002-10-01.nc kwcase.nc"
#fi
XFAILTESTS="$XFAILTESTS EOSDB OverideExample SimpleDrdsExample test.67 test.gr5 123bears.nc 123.nc bears.nc ber-2002-10-01 data.nc in1.nc in_2.nc in_no_three_double_dmn.nc test.nc text.nc test.22 test.23 test.gr1 in.nc ber-2002-10-01.nc kwcase.nc"
FILETESTS="${SYNTHETICDATA} ${SOURCEFILES}"
#DDSTESTS intersect FILETESTS should be empty

View File

@ -1,9 +1,8 @@
#!/bin/sh
if test "x$SETX" = x1 ; then set -x ; fi
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
set -e
. ${srcdir}/tst_utils.sh

View File

@ -47,7 +47,7 @@ kwcase.nc"
XFAILTESTS=""
# For now, remove some tests from windows platform.
if [ `uname | cut -d "_" -f 1` = "MINGW32" ]; then
if test "x$FP_ISMINGW" == xyes || test "x$FP_ISMSVC" == xyes ; then
XFAILTESTS="$XFAILTESTS EOSDB OverideExample SimpleDrdsExample test.67 test.gr5 123bears.nc 123.nc bears.nc ber-2002-10-01 data.nc in1.nc in_2.nc in_no_three_double_dmn.nc test.nc text.nc test.22 test.23 test.gr1 in.nc ber-2002-10-01.nc kwcase.nc"
fi

View File

@ -19,7 +19,7 @@ srcdir=`pwd`
# Do a hack to remove e.g. c: for CYGWIN
builddir=`pwd`/..
# Hack for CYGWIN
if [ `uname | cut -d "_" -f 1` = "MINGW32" ]; then
if test "x$FP_ISMINGW" = yes ; then
srcdir=`pwd | sed 's/\/c\//c:\//g'`
builddir="$srcdir"/..
fi

View File

@ -17,10 +17,6 @@ fi
PARAMS="[log]"
#PARAMS="${PARAMS}[show=fetch]"
# Determine If we're on OSX or Linux
myplatform=`uname -a | cut -d" " -f 1`
#OCLOGFILE=/dev/null
OCLOGFILE="" ; export OCLOGFILE
@ -147,8 +143,8 @@ REMOTETESTSCB="dods"
# Known to fail
XFAILTESTS3=""
# For now, remove some tests from windows platform.
if [ `uname | cut -d "_" -f 1` = "MINGW32" ]; then
# For now, remove some tests from mingw platform.
if test "x$FP_ISMINGW" = xyes ; then
XFAILTESTS3="$XFAILTESTS3 test.67"
fi
@ -239,7 +235,7 @@ for t in ${TESTSET} ; do
#index=`expr index "${t}" ";"`
#echo index: $index
if [ "$myplatform" = "Darwin" ]; then
if test "x$FP_ISOSX" = xyes ; then
index=`echo "${t}" | sed -n "s/;.*//p" | wc -c`
if (( $index == 0 )) ; then
constrained=0

View File

@ -1,7 +1,5 @@
#!/bin/bash
if test "x$SETX" = x1 ; then set -x ; fi
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh

View File

@ -19,7 +19,7 @@ srcdir=`pwd`
# compute the build directory
builddir=`pwd`/..
# Hack for CYGWIN
if [ `uname | cut -d "_" -f 1` = "MINGW32" ]; then
if test "x$FP_ISMINGW" = xyes ; then
srcdir=`pwd | sed 's/\/c\//c:\//g'`
builddir="$srcdir"/..
fi

View File

@ -155,9 +155,9 @@ for x in ${REMOTETESTS} ; do
if test "x$quiet" = "x0" ; then echo "*** Testing: ${name} ; url=$url" ; fi
# determine if this is an xfailtest
isxfail=0
if test "x${XFAILTESTS}" != x ; then
if IGNORE=`echo -n " ${XFAILTESTS} " | fgrep " ${name} "`; then isxfail=1; fi
fi
for xf in $XFAILTESTS ; do
if test "x$xf" = "x${name}" ; then isxfail=1; fi
done
ok=1
if ${NCDUMP} ${DUMPFLAGS} "${url}" | sed 's/\\r//g' > ${name}.dmp ; then ok=$ok; else ok=0; fi
# compare with expected

View File

@ -23,17 +23,6 @@ passcount=0
xfailcount=0
failcount=0
# Try to figure out our platform
myplatform=`uname -a | cut -d" " -f 1`
case "$myplatform" in
Darwin*) platform=osx ;;
MINGW*) platform=mingw ;;
CYGWIN*) platform=cygwin ;;
linux*) platform=linux ;;
Linux*) platform=linux ;;
*) platform=unknown ;;
esac
# How to access local files
FILEURL="file://${testdata3}"

View File

@ -1,11 +1,10 @@
#!/bin/sh
if test "x$SETX" != x ; then set -x; fi
set -e
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
set -e
##
# If the bug referenced in https://github.com/Unidata/netcdf-c/issues/1300
# reoccurs, then the following command would fail.

View File

@ -13,6 +13,7 @@ FP_ISMSVC=@ISMSVC@
FP_ISCYGWIN=@ISCYGWIN@
FP_ISMINGW=@ISMINGW@
FP_ISMSYS=@ISMSYS@
FP_ISOSX=@ISOSX@
FP_ISREGEDIT=@ISREGEDIT@
FP_USEPLUGINS=@USEPLUGINS@