diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in new file mode 100644 index 0000000000..c437205608 --- /dev/null +++ b/CTestCustom.cmake.in @@ -0,0 +1,21 @@ +# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, +# 2015, 2016, 2017, 2018 +# University Corporation for Atmospheric Research/Unidata. + +# See netcdf-c/COPYRIGHT file for more info. +## This file is used to customize CTest. +## See: +## +## http://public.kitware.com/Wiki/CTest:Using_CTEST_and_CDASH_without_CMAKE +## +## for more information. + +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "500") + +IF(ENABLE_S3_TESTING) +# Before and after all tests are run, we need to try to cleanup the junk left in the Unidata S3 bucket. +# Assume run in top-level CMAKE_BINARY_DIR +set(CTEST_CUSTOM_PRE_TEST "${CMAKE_BINARY_DIR}/nczarr_test/run_s3_cleanup.sh ${CMAKE_BINARY_DIR} ${S3TESTSUBTREE}") +set(CTEST_CUSTOM_POST_TEST "${CMAKE_BINARY_DIR}/nczarr_test/run_s3_cleanup.sh ${CMAKE_BINARY_DIR} ${S3TESTSUBTREE}") +ENDIF() diff --git a/nc_test4/tst_filter_misc.sh b/nc_test4/tst_filter_misc.sh index 7e8ad8bef8..4efe553613 100755 --- a/nc_test4/tst_filter_misc.sh +++ b/nc_test4/tst_filter_misc.sh @@ -21,6 +21,14 @@ if test "x$TESTNCZARR" = x1; then s3isolate fi +if test "x$TESTNCZARR" = x1; then + TFAVAIL =${execdir}/test_filter_avail + TFVLEN =${execdir}/test_filter_vlen +else + TFAVAIL =${execdir}/tst_filter_avail + TFVLEN =${execdir}/tst_filter_vlen +fi + # Load the findplugins function . ${builddir}/findplugin.sh echo "findplugin.sh loaded" @@ -85,20 +93,12 @@ setfilter() { testavail() { zext=$1 if ! filteravail bzip2; then return 0; fi - if test "x$TESTNCZARR" = x1 ; then - ${execdir}/test_filter_avail - else - ${execdir}/tst_filter_avail - fi + ${TFAVAIL} } testvlen() { zext=$1 - if test "x$TESTNCZARR" = x1 ; then - ${execdir}/test_filter_vlen - else - ${execdir}/tst_filter_vlen - fi + ${TFVLEN} } testset() { diff --git a/nczarr_test/run_s3_cleanup.sh b/nczarr_test/run_s3_cleanup.sh index 542af09d5c..0a593c0876 100755 --- a/nczarr_test/run_s3_cleanup.sh +++ b/nczarr_test/run_s3_cleanup.sh @@ -1,19 +1,9 @@ #!/bin/sh -if test "x$srcdir" = x ; then srcdir=`pwd`; fi -. ../test_common.sh - -. "$srcdir/test_nczarr.sh" - -set -e - -echo "" -echo "*** Remove /netcdf-c from S3 repository" - -fileargs netcdf-c - -if test "x$FEATURE_S3TESTS" = xyes ; then -${execdir}/s3util -u "${NCZARR_S3_TEST_URL}" -k "/netcdf-c" clear -fi +set -x +TESTDIR="$1" +S3TESTSUBTREE="$2" +echo ">>> *** Remove /${TESTSUBTREE} from S3 repository" +echo ${TESTDIR}/nczarr_test/s3util -u "https://s3.us-east-1.amazonaws.com/unidata-zarr-test-data" -k "/${S3TESTSUBTREE}" clear exit 0