diff options
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rwxr-xr-x | bin/snapshot | 552 | ||||
-rwxr-xr-x | config/cmake/scripts/CTestScript.cmake | 83 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF5config.cmake | 101 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF5options.cmake | 33 | ||||
-rw-r--r-- | config/cmake_ext_mod/FindMPI.cmake | 22 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 28 | ||||
-rw-r--r-- | fortran/testpar/CMakeLists.txt | 4 | ||||
-rw-r--r-- | test/cache_image.c | 7 | ||||
-rw-r--r-- | tools/test/h5diff/CMakeTests.cmake | 13 |
10 files changed, 609 insertions, 243 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f4b5e09..9016f29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -877,6 +877,15 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif () endif () + # Parallel IO usage requires MPI to be Linked and Included + if (H5_HAVE_PARALLEL) + set (LINK_Fortran_LIBS ${LINK_LIBS} ${MPI_Fortran_LIBRARIES}) + set (LINK_Fortran_SHARED_LIBS ${LINK_SHARED_LIBS} ${MPI_Fortran_LIBRARIES}) + if (MPI_Fortran_LINK_FLAGS) + set (CMAKE_Fortran_EXE_LINKER_FLAGS "${MPI_Fortran_LINK_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}") + endif () + endif () + # ----------------------------------------------------------------------- # wrapper script variables # diff --git a/bin/snapshot b/bin/snapshot index a496edd..cc4bbc9 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -13,13 +13,14 @@ # http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have # access to either file, you may request a copy from help@hdfgroup.org. -# This script should be run nightly from cron. It checks out hdf5 +# This script should be run nightly from cron. It checks out the source # from the source repository and compares it against the previous # snapshot. If anything significant changed then a new snapshot is # created, the minor version number is incremented, and the change is # checked back into the source repository. # + # function definitions TIMESTAMP() { @@ -28,7 +29,7 @@ TIMESTAMP() EXIT_BANNER() { -TIMESTAMP "Exit $PROGNAME with status=$?" + TIMESTAMP "Exit $PROGNAME with status=$?" } # Show current total disk usage. @@ -38,11 +39,178 @@ DISKUSAGE() ( read x y; echo "Disk Usage=$x KB" ) } +# function provided for testing software downloaded as tar files. A version of +# this function that properly extracts the downloaded files can be provided in +# the snapshots-${sw}-overrides file. +EXTRACT() +{ + echo "Error: ${SWVERSION} is in source repository - does not need extraction." +} + +# Standard procedure for checking out or updating source code from an hdfgroup +# git repository. Override the function for other repositories or procedures. +SOURCE_CHECKOUT() +{ + if test -n $GIT_URL; then + if [ -n "$AUTOGEN" ]; then + echo "Creating fresh clone of $GIT_URL in $BASEDIR/current_src" + # Check out the current version from source repository. + (cd $BASEDIR; rm -rf current_src + if test -z $GIT_BRANCH; then + echo "Testing empty branch $GIT_BRANCH." + git clone $GIT_URL current_src + else + echo "Testing branch $GIT_BRANCH." + git clone $GIT_URL -b $GIT_BRANCH current_src + fi + ) || exit 1 + else + echo "Creating fresh clone of $GIT_URL in $BASEDIR/current" + # Check out the current version from source repository. + (cd $BASEDIR; rm -rf current + if test -n $GIT_BRANCH; then + git clone $GIT_URL -b $GIT_BRANCH current + else + git clone $GIT_URL current + fi ) || exit 1 + fi + else + echo "Warning! Source directory ("current") is not checked out from git." + fi +} + +# Standard procedure for running the configure command in a build (test) +# directory +RUNCONFIGURE() +{ + if [ "${CURRENT}" != "${TESTDIR}" -a "$CPSRC" = "yes" ]; then + echo "Copying source files to ${TESTDIR}." + cp -pr ${CURRENT}/* ${TESTDIR} + cd ${TESTDIR} + ./${CONFIGURE} + elif [ -n "${AUTOGEN}" ]; then + ${CURRENTSRC}/${CONFIGURE} + else + ${CURRENT}/${CONFIGURE} + fi +} + +# Sometimes "make distclean" doesn't adequately remove files from the previous +# build. If a build (test) directory was used, its contents can be entirely +# deleted to provide a clean start. If the test is building in the source +# directory, the contents can't be deleted, so run "make distclean". +DISTCLEAN() +{ + if [ "${srcdir}" = "yes" -a -n "${SRCDIRNAME}" -a -d ${BASEDIR}/TestDir/${SRCDIRNAME} ]; then + echo "Remove contents of $SRCDIRNAME.\n" + rm -rf ${BASEDIR}/TestDir/${SRCDIRNAME}/* + else + echo "$MAKE distclean" + (cd ${TESTDIR} && ${MAKE} distclean) + fi +} + +# Several of the software packages tested do not support make check-install. +# Those that support it should have a version of this function in their +# override with the following lines: +# TIMESTAMP "check-install $1" +# ${MAKE} check-install $1 +CHECKINSTALL() +{ + echo "check-install is not supported for ${SWVERSION}" +} + +# Function for hdf4 and hdf5 to override to check in changes after snapshot. +# Safety measure to avoid unintended checkins to other repositories. +COMMITSNAPSHOT() +{ + echo "original hdf5 script committed code changes back into git." +} + +DISPLAYUSAGE() +{ + set - + cat <<EOF +Usage: $PROGNAME [all] [checkout] [ftp <URL> [diff] [test] [srcdir] [release] [help] + [clean] [distclean] [echo] [deploy <dir>] [deploydir <dir>] + [zlib <zlib_path>] [releasedir <dir>] [srcdirname <dir>] [check-vfd] + [exec <command>] [module-load <module-list>] [op-configure <option>] + [--<option>] + all: Run all commands (checkout, test & release) + [Default is all] + checkout: Run source checkout + diff: Run diff on current and previous versions. Exit 0 if + no significant differences are found. Otherwise, non-zero. + deploy: deploy binary to directory <dir> + deploydir: use <dir> as the default directory for deployment + test: Run test + release: Run release + clean: Run make clean + distclean:Run make distclean + echo: Turn on echo mode (set -x) + setenv <name> <value>: + Set environment variable <name> to <value>. + setenvN <N> <name> <value> ...: + Set environment variable with <N> values. + E.g., setenvN 3 x a b c is same as setenv x="a b c". + srcdir: Use srcdir option (does not imply other commands) + "snapshot srcdir" is equivalent to "snapshot srcdir all" + "snapshot srcdir checkout" is equivalent to "snapshot checkout" + srcdirname <dir>: + Use <dir> as the srcdir testing directory if srcdir is choosen. + If <dir> starts with '-', it is append to the default name + E.g., "snapshot srcdir srcdirname -xx" uses hostname-xx + [Default is hostname] + help: Print this message + echo: Turn on shell echo + zlib <zlib_path>: + Use <zlib_path> as the ZLIB locations + [Default is $ZLIB_default] + releasedir <dir>: + Use <dir> as the release directory + [Default is $ReleaseDir_default] + check-vfd: + Run make check-vfd instead of just make check. + exttest <testscript>; + Run testscript; + exec <command>: + Run <command>; + module-load <module-list>: + Load modules in comma-separated <module-list>; + op-configure <option>: + Pass <option> to the configure command + E.g., "snapshot op-configure --enable-parallel" + configures for parallel mode + --<option>: + Pass --<option> to the configure command + E.g., "snapshot --enable-parallel" + configures for parallel mode +EOF + exit $errcode +} # MAIN # SGI /bin/sh replaces $0 as function name if used in a function. # Set the name here to avoid that ambiguity and better style too. PROGNAME=$0 +SNAPSHOTNAME= +HDFREPOS= +DOCVERSION="" +MODULELIST="" + +if [ -f bin/snapshot_params ]; then + . bin/snapshot_params + echo "Added snapshot_params." +fi +if [ -z "$SWVER" -a -f bin/snapshot_version ] +then + . bin/snapshot_version + echo "Added snapshot_version." +fi +if [ -n ${HDFREPOS} -a -f bin/snapshot-${HDFREPOS}-overrides ]; then + . bin/snapshot-${HDFREPOS}-overrides + echo "Added snapshot-${HDFREPOS}-overrides." +fi echo "=====================================" echo "$PROGNAME $*" @@ -51,7 +219,7 @@ TIMESTAMP MAIN uname -a # setup exit banner message -trap EXIT_BANNER 0 +trap EXIT_BANNER 0 1 2 9 15 # Dump environment variables before option parsing echo ===Dumping environment variables before option parsing === @@ -67,8 +235,14 @@ ReleaseDir_default=release_dir ZLIB_default= ZLIB=$ZLIB_default -# What compression methods to use? -METHODS="gzip zip bzip2 doc" +# What compression methods to use? (md5 does checksum). Doc was apparently +# added as a compression method to create a separate tarfile containing the +# documentation files for v 1.8 and above. +if [ "${SWVERSION}" = "hdf5_1_6" ]; then + METHODS="gzip bzip2 md5" +else + METHODS="gzip bzip2 doc" +fi # Use User's MAKE if set. Else use generic make. MAKE=${MAKE:-make} @@ -81,15 +255,38 @@ CHECKVAL=check cmd="all" test_opt="" errcode=0 +AUTOGEN="" +EXTTEST="" +EXEC_CMD_ARG="" while [ $# -gt 0 ] ; do case "$1" in all) cmd="all" ;; + checkout-autogen) + cmdcheckout="checkout" + AUTOGEN="autogen" + cmd="" + ;; checkout) cmdcheckout="checkout" cmd="" ;; + ftp) + echo "Setting ftp flags in snapshot script" + cmdcheckout="checkout" + cmdftp="ftp" + cmd="" + shift + if [ $# -lt 1 ]; then + echo "URL missing" + errcode=1 + cmd="help" + break + fi + ftp_url="$1" + echo "ftp_url is $ftp_url" + ;; diff) cmddiff="diff" cmd="" @@ -164,6 +361,10 @@ while [ $# -gt 0 ] ; do cmdrel="release" cmd="" ;; + autogen-release) + cmdrel="autogen-release" + cmd="" + ;; clean | distclean) cmdclean="$1" cmd="" @@ -196,12 +397,43 @@ while [ $# -gt 0 ] ; do fi ReleaseDir="$1" ;; + exttest) + shift + if [ $# -lt 1 ]; then + echo "exttest script name missing" + errcode=1 + cmd="help" + break + fi + cmd="" + EXTTEST="$1" + ;; + exec) + shift + if [ $# -lt 1 ]; then + echo "exec command name missing" + errcode=1 + cmd="help" + break + fi + cmd="" + EXEC_CMD_ARG="$@" + # exit the parsing while loop since all arguments have been consummed. + break + ;; check-vfd) CHECKVAL=check-vfd ;; - yodconfigure) - YODCONFIGURE=yes - ;; + module-load) + shift + if [ $# -lt 1 ]; then + echo "missing module list to load" + errcode=1 + cmd="help" + break + fi + MODULELIST="$1" + ;; --*) OP_CONFIGURE="$OP_CONFIGURE $1" ;; @@ -225,87 +457,39 @@ while [ $# -gt 0 ] ; do shift done +if [ -n "$MODULELIST" ]; then + . ~/.bashrc + module use /opt/pkgs/modules/all + # load module command will take a space separated list of modules. + # If we have a comma separated list, convert ',' to ' '. + MODULELIST="$( echo -e "$MODULELIST" | tr ',' ' ' )" + module load $MODULELIST +fi + # Dump environment variables after option parsing echo ===Dumping environment variables after option parsing === printenv | sort echo ===Done Dumping environment variables after option parsing === if [ "$cmd" = help ]; then - set - - cat <<EOF -Usage: $PROGNAME [all] [checkout] [diff] [test] [srcdir] [release] [help] - [clean] [distclean] [echo] [deploy <dir>] [deploydir <dir>] - [zlib <zlib_path>] [releasedir <dir>] [srcdirname <dir>] [check-vfd] - [op-configure <option>] [--<option>] - all: Run all commands (checkout, test & release) - [Default is all] - checkout: Run source checkout - diff: Run diff on current and previous versions. Exit 0 if - no significant differences are found. Otherwise, non-zero. - deploy: deploy binary to directory <dir> - deploydir: use <dir> as the default directory for deployment - test: Run test - release: Run release - clean: Run make clean - distclean:Run make distclean - echo: Turn on echo mode (set -x) - setenv <name> <value>: - Set environment variable <name> to <value>. - setenvN <N> <name> <value> ...: - Set environment variable with <N> values. - E.g., setenvN 3 x a b c is same as setenv x="a b c". - srcdir: Use srcdir option (does not imply other commands) - "snapshot srcdir" is equivalent to "snapshot srcdir all" - "snapshot srcdir checkout" is equivalent to "snapshot checkout" - srcdirname <dir>: - Use <dir> as the srcdir testing directory if srcdir is choosen. - If <dir> starts with '-', it is append to the default name - E.g., "snapshot srcdir srcdirname -xx" uses hostname-xx - [Default is hostname] - help: Print this message - echo: Turn on shell echo - zlib <zlib_path>: - Use <zlib_path> as the ZLIB locations - [Default is $ZLIB_default] - releasedir <dir>: - Use <dir> as the release directory - [Default is $ReleaseDir_default] - check-vfd: - Run make check-vfd instead of just make check. - op-configure <option>: - Pass <option> to the configure command - E.g., "snapshot op-configure --enable-parallel" - configures for parallel mode - --<option>: - Pass --<option> to the configure command - E.g., "snapshot --enable-parallel" - configures for parallel mode -EOF - exit $errcode + DISPLAYUSAGE fi # Setup the proper configure option (--with-zlib) to use zlib library # provide ZLIB is non-empty. ZLIB=${ZLIB:+"--with-zlib="$ZLIB} -if [ -n "$YODCONFIGURE" ]; then - cp configure configure.yod - bin/yodconfigure configure.yod - CONFIGURE="./configure.yod" -else - CONFIGURE="./configure" +# Adding --prefix as a configure option will put the path to the deploy +# directory in the initial libhdf5*.la files +if [ -n "$DEPLOYDIRNAME" ]; then + OP_CONFIGURE="$OP_CONFIGURE --prefix=${deploydir}/${DEPLOYDIRNAME}" fi -CONFIGURE="$CONFIGURE $ZLIB $OP_CONFIGURE" +CONFIGURE="configure $OP_CONFIGURE" +# echo "Configure command is $CONFIGURE" # Execute the requests snapshot=yes -if [ -f bin/snapshot_version ]; then - . bin/snapshot_version -else - H5VERSION=hdf5 -fi - -BASEDIR=${HOME}/snapshots-${H5VERSION} +BASEDIR=${HOME}/snapshots-${SNAPSHOTNAME} if [ ! -d ${BASEDIR} ]; then echo "BASEDIR ($BASEDIR) does not exist" exit 1 @@ -315,11 +499,6 @@ CURRENT=${BASEDIR}/current PREVIOUS=${BASEDIR}/previous ReleaseDir=${ReleaseDir:=${BASEDIR}/${ReleaseDir_default}} HOSTNAME=`hostname | cut -f1 -d.` # no domain part -if [ $H5VERSION != hdf5 ]; then - SVNVERSION="hdf5/branches/$H5VERSION" -else - SVNVERSION=hdf5/trunk # use the default (trunk) version -fi # Try finding a version of diff that supports the -I option too. DIFF=diff @@ -333,19 +512,48 @@ done #============================= if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then TIMESTAMP "checkout" - # If there is a Makefile in ${CURRENT}, the last test done in it - # has not been distclean'ed. They would interfere with other - # --srcdir build since make considers the files in ${CURRENT} - # take precedence over files in its own build-directory. Run - # a "make distclean" to clean them all out. This is not really - # part of the "checkout" functions but this is the most convenient - # spot to do the distclean. We will also continue the checkout process - # regardless of the return code of distclean. - ( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean) - - SVNROOT=http://svn.hdfgroup.uiuc.edu - # Check out the current version from source repository. - (cd $BASEDIR; svn -q co ${SVNROOT}/${SVNVERSION} current ) || exit 1 + # ${BASEDIR}/bin is now updated from git by EveningMaint or DailyMaint + # to avoid updating the scripts in ${BASEDIR}/bin while they are running. + + if [ -z "$AUTOGEN" ]; then + # If there is a Makefile in ${CURRENT}, the last test done in it + # has not been distclean'ed. They would interfere with other + # --srcdir build since make considers the files in ${CURRENT} + # take precedence over files in its own build-directory. Run + # a "make distclean" to clean them all out. This is not really + # part of the "checkout" functions but this is the most convenient + # spot to do the distclean. We will also continue the checkout process + # regardless of the return code of distclean. + ( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean) + fi + # echo "cmdftp is $cmdftp; ftp_url is $ftp_url" + if [ -n "$cmdftp" ]; then + echo "Get the NetCDF4 source from their ftp server." + echo "Command executed is: 2>&1 wget -N $ftp_url" + cd ${BASEDIR}; + WGET_OUTPUT="`2>&1 wget -N $ftp_url`" + errcode=$? + if [[ $errcode -ne 0 ]]; then + exit $errcode + fi + + if [ $? -ne 0 ];then + echo $0: "$WGET_OUTPUT" Exiting. + exit 1 + fi + + # echo "Wget output was $WGET_OUTPUT" + + if echo "$WGET_OUTPUT" | fgrep 'not retrieving' &> /dev/null + then + echo "Snapshot unchanged" + else + echo "New snapshot downloaded" + EXTRACT + fi + else + SOURCE_CHECKOUT + fi fi # Do source checkout @@ -353,7 +561,7 @@ fi # Do source checkout # Run Test the HDF5 library #============================= if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then - TIMESTAMP "diff" + TIMESTAMP "Run Tests" # setup if srcdir is used. if [ -z "$srcdir" ]; then TESTDIR=${CURRENT} @@ -369,10 +577,15 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then esac TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} test -d ${TESTDIR} || mkdir ${TESTDIR} + # set TESTDIR to use the direct path to the local test directory + # rather than the path through ${BASEDIR}. + cd ${TESTDIR} + TESTDIR=`pwd -P` + cd ${CURRENT} fi # Make sure current version exists and is clean if [ -d ${TESTDIR} ]; then - (cd ${TESTDIR} && ${MAKE} distclean) + DISTCLEAN else errcode=$? snapshot=no @@ -382,12 +595,17 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then # Compare it with the previous version. Compare only files listed in # the MANIFEST plus the MANIFEST itself. if [ -d ${PREVIOUS} ]; then - if (${DIFF} -c ${PREVIOUS}/MANIFEST ${CURRENT}/MANIFEST); then + if [ -z "${AUTOGEN}" ]; then + CURRENTSRC=${CURRENT} + else + CURRENTSRC=${BASEDIR}/current_src + fi + if (${DIFF} -c ${PREVIOUS}/MANIFEST ${CURRENTSRC}/MANIFEST); then snapshot=no - for src in `grep '^\.' ${CURRENT}/MANIFEST|expand|cut -f1 -d' '`; do + for src in `grep '^\.' ${CURRENTSRC}/MANIFEST|expand|cut -f1 -d' '`; do if ${DIFF} -I H5_VERS_RELEASE -I " released on " \ -I " currently under development" \ - ${PREVIOUS}/$src ${CURRENT}/$src + ${PREVIOUS}/$src ${CURRENTSRC}/$src then : #continue else @@ -408,44 +626,123 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then fi fi + #============================= + # Execute command if defined + #============================= + #echo BEFORE EXEC command + #echo EXEC_CMD_ARG=${EXEC_CMD_ARG} + + if [ -n "$EXEC_CMD_ARG" ]; then + TIMESTAMP ${EXEC_CMD_ARG} + TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} + test -d ${TESTDIR} || mkdir ${TESTDIR} + if cd ${TESTDIR}; then + # clean up the directory before executing the command + # Do we need to clean first? + # rm -rf * + # + # If EXEC_CMD_ARG starts with a '/', it has an absolute path, else it is + # relative to the BASEDIR. + case "$EXEC_CMD_ARG" in + /*) + ${EXEC_CMD_ARG} + ;; + *) + ${BASEDIR}/${EXEC_CMD_ARG} + ;; + esac + errcode=$? + else + echo "${TESTDIR} not accessible" + errcode=1 + fi + # exit snapshot since nothing else to do, for now. + exit $errcode + fi + # Build, run tests and install procedures - if [ "$snapshot" = "yes" ]; then + if [ "$snapshot" = "yes" ] && [ "$NOMAKE" != "yes" ]; then + FAIL_SECTION="" + if [ -f ${TESTDIR}/failsection ]; then + rm ${TESTDIR}/failsection + fi if (cd ${TESTDIR} && \ - TIMESTAMP "configure" && \ - ${srcdir:+${CURRENT}/}${CONFIGURE} && \ - TIMESTAMP "make" && \ + TIMESTAMP "configure" && echo "configure" > ${TESTDIR}/failsection && \ + RUNCONFIGURE && \ + sleep 2 && \ + TIMESTAMP "make" && echo "make" > ${TESTDIR}/failsection && \ ${MAKE} && DISKUSAGE \ - TIMESTAMP ${CHECKVAL} && \ + TIMESTAMP ${CHECKVAL} && echo "make check" > ${TESTDIR}/failsection && \ ${MAKE} ${CHECKVAL} && DISKUSAGE \ - TIMESTAMP "install" && \ - ${MAKE} install-all && DISKUSAGE \ - TIMESTAMP "check-install" && \ - ${MAKE} check-install && DISKUSAGE \ - TIMESTAMP "uninstall" && \ - ${MAKE} uninstall-all && DISKUSAGE); then + TIMESTAMP "install" && echo "make install" > ${TESTDIR}/failsection && \ + ${MAKE} install && DISKUSAGE \ + TIMESTAMP "check-install" && echo "make check-install" > ${TESTDIR}/failsection && \ + CHECKINSTALL && DISKUSAGE \ + TIMESTAMP "uninstall" && echo "make uninstall" > ${TESTDIR}/failsection && \ + ${MAKE} uninstall && DISKUSAGE); then : else errcode=$? + FAIL_SECTION=`cat ${TESTDIR}/failsection` + echo "Failed running ${FAIL_SECTION}" snapshot=no exit $errcode fi + elif [ $CPSRC ]; then + cp -pr ${CURRENT}/* ${TESTDIR} + else + cmdclean="" fi fi # Test the HDF5 library +# Run external test if configured #============================= +#============================= +#if [ -d "$CURRENT" ]; then +if [ "$EXTTEST" != "" ]; then + TIMESTAMP ${EXTTEST} + TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME} + test -d ${TESTDIR} || mkdir ${TESTDIR} + cd ${TESTDIR} + sleep 1 + TIMESTAMP $pwd + ls + ${BASEDIR}/${EXTTEST} + errcode=$? + exit $errcode +fi + +#============================= # Run deployment if requested. #============================= if [ -n "$DEPLOYDIRNAME" ]; then + # The daily tests deploy to .../hdf5/... or .../hdf4/... except on cobalt where the + # deploy directory is in .../HDF5/... lc will take care of this. If hdf4 or hdf5 + # either upper or lower case isn't in the path, RELEASE.txt won't be found unless + # it is in $CURRENT. + POS4=`perl -e "print index(lc(\"${deploydir}/${DEPLOYDIRNAME}\"), 'hdf4')"` + POS5=`perl -e "print index(lc(\"${deploydir}/${DEPLOYDIRNAME}\"), 'hdf5')"` + if [ "${POS4}" -ge "0" ]; then + RELEASE_TXT_LOC="release_notes" + elif [ "${POS5}" -ge "0" ]; then + RELEASE_TXT_LOC="release_docs" + else + RELEASE_TXT_LOC="" + fi + if [ "$snapshot" = "yes" ]; then TIMESTAMP "deploy" if (cd ${TESTDIR} && - ${CURRENT}/bin/deploy ${deploydir}/${DEPLOYDIRNAME} && \ + ${BASEDIR}/bin/deploy ${deploydir}/${DEPLOYDIRNAME} && \ TIMESTAMP "clean" && \ ${MAKE} clean && \ TIMESTAMP "check-install prefix=${deploydir}/${DEPLOYDIRNAME}" && \ - ${MAKE} check-install prefix=${deploydir}/${DEPLOYDIRNAME}); then - : #continue + CHECKINSTALL prefix=${deploydir}/${DEPLOYDIRNAME}); then + cd ${CURRENT} + cp ${RELEASE_TXT_LOC}/RELEASE.txt ${deploydir}/${DEPLOYDIRNAME} + cp COPYING ${deploydir}/${DEPLOYDIRNAME} + #: #continue else errcode=$? exit $errcode @@ -460,24 +757,41 @@ fi # Deploy if [ "$cmd" = "all" -o -n "$cmdrel" ]; then if [ "$snapshot" = "yes" ]; then TIMESTAMP "release" - (cd ${CURRENT} && ${MAKE} distclean) + DISTCLEAN ( # Turn on exit on error in the sub-shell so that it does not # commit source if errors encounter here. set -e - cd ${CURRENT} - RELEASE_VERSION="`perl bin/h5vers -v`" - echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..." - bin/release -d $ReleaseDir $METHODS - perl bin/h5vers -i - svn -q commit -m "Snapshot $RELEASE_VERSION" + if [ "$cmdrel" = "autogen-release" ]; then + cd ${BASEDIR}/current_src + else + cd ${CURRENT} + fi + if [ "$HDFREPOS" = "hdf4" ]; then + RELEASE_VERSION="`perl bin/h4vers -v`" + echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..." + bin/release -d $ReleaseDir $METHODS + perl bin/h4vers -i + elif [ "$HDFREPOS" = "hdf5" ]; then + RELEASE_VERSION="`perl bin/h5vers -v`" + echo "Making snapshot release ($RELEASE_VERSION) to ${ReleaseDir}..." + if [ "${DOCVERSION}" ]; then + bin/release -d $ReleaseDir --docver ${DOCVERSION} $METHODS + else + bin/release -d $ReleaseDir $METHODS + fi + perl bin/h5vers -i + else + echo "need real release steps. For now, only move current version to previous" + fi + COMMITSNAPSHOT ) errcode=$? fi # Replace the previous version with the current version. # Should check if the errcode of the release process but there - # are other failures after release was done (e.g. h5vers or svn failures) + # are other failures after release was done (e.g. h5vers or git failures) # that should allow the replacement to occure. rm -rf ${PREVIOUS} mv ${CURRENT} ${PREVIOUS} @@ -487,7 +801,7 @@ fi #Release snapshot #============================= # Clean the test area. Default is no clean. #============================= -if [ -n "$cmdclean" ]; then +if [ -n "$cmdclean" ] && [ "$NOMAKE" != "yes" ]; then TIMESTAMP "clean" # setup if srcdir is used. if [ -z "$srcdir" ]; then diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 7657fc2..e525078 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -25,14 +25,11 @@ if(NOT SITE_OS_NAME) message(STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
set(CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
- if(USE_AUTOTOOLS)
- set(CTEST_BUILD_NAME "AT-${CTEST_BUILD_NAME}")
- endif()
if(SITE_BUILDNAME_SUFFIX)
- set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
+ set(CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
endif()
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS}")
-else(NOT SITE_OS_NAME)
+else()
## machine name provided
## --------------------------
if(CMAKE_HOST_UNIX)
@@ -44,7 +41,7 @@ else(NOT SITE_OS_NAME) set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${SITE_BUILDNAME_SUFFIX}")
endif()
set(BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
-endif(NOT SITE_OS_NAME)
+endif()
#-----------------------------------------------------------------------------
# MAC machines need special option
@@ -59,12 +56,12 @@ if(APPLE) if(NOT NO_MAC_FORTRAN)
# Shared fortran is not supported, build static
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
- else(NOT NO_MAC_FORTRAN)
+ else()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
- endif(NOT NO_MAC_FORTRAN)
+ endif()
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
-endif(APPLE)
+endif()
#-----------------------------------------------------------------------------
set(NEED_REPOSITORY_CHECKOUT 0)
@@ -73,10 +70,10 @@ if(CTEST_USE_TAR_SOURCE) ## Uncompress source if tar file provided
## --------------------------
if(WIN32)
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_USE_TAR_SOURCE}.zip]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} x ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}\\${CTEST_USE_TAR_SOURCE}.zip RESULT_VARIABLE rv)
else()
- message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_USE_TAR_SOURCE}.tar]")
+ message(STATUS "extracting... [${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar]")
execute_process(COMMAND ${CMAKE_EXECUTABLE_NAME} -E tar -xvf ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE}.tar RESULT_VARIABLE rv)
endif()
@@ -88,7 +85,7 @@ if(CTEST_USE_TAR_SOURCE) file(RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
set(LOCAL_SKIP_UPDATE "TRUE")
-else(CTEST_USE_TAR_SOURCE)
+else()
if(LOCAL_UPDATE)
if(CTEST_USE_GIT_SOURCE)
find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
@@ -109,7 +106,7 @@ else(CTEST_USE_TAR_SOURCE) set(CTEST_GIT_options "pull")
endif()
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
- else(CTEST_USE_GIT_SOURCE)
+ else()
## --------------------------
## use subversion to get source
#-----------------------------------------------------------------------------
@@ -140,9 +137,9 @@ else(CTEST_USE_TAR_SOURCE) set(CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
endif()
endif()
- endif(CTEST_USE_GIT_SOURCE)
- endif(LOCAL_UPDATE)
-endif(CTEST_USE_TAR_SOURCE)
+ endif()
+ endif()
+endif()
#-----------------------------------------------------------------------------
## Clear the build directory
@@ -166,22 +163,11 @@ endif() #-----------------------------------------------------------------------------
# Send the main script as a note.
-if(USE_AUTOTOOLS)
- ## autotools builds need to use make and does not use the cacheinit.cmake file
- ## -- make command
- ## -----------------
- find_program(MAKE NAMES make)
- list(APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- )
-else()
- list(APPEND CTEST_NOTES_FILES
- "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
- "${CMAKE_CURRENT_LIST_FILE}"
- "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
- )
-endif()
+list(APPEND CTEST_NOTES_FILES
+ "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
+ "${CMAKE_CURRENT_LIST_FILE}"
+ "${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
+)
#-----------------------------------------------------------------------------
# Check for required variables.
@@ -194,32 +180,25 @@ foreach(req if(NOT DEFINED ${req})
message(FATAL_ERROR "The containing script must set ${req}")
endif()
-endforeach(req)
+endforeach()
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
-if(USE_AUTOTOOLS)
- set(CTEST_CONFIGURE_COMMAND "${CTEST_SOURCE_DIRECTORY}/configure ${ADD_BUILD_OPTIONS}")
- set(CTEST_BUILD_COMMAND "${MAKE} ${CTEST_BUILD_FLAGS}")
- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
- file(WRITE ${CTEST_BINARY_DIRECTORY}/CTestTestfile.cmake "ADD_TEST(makecheck \"${MAKE}\" \"${CTEST_BUILD_FLAGS}\" \"-i\" \"check\")")
-else(USE_AUTOTOOLS)
- if(LOCAL_MEMCHECK_TEST)
- find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
- else()
- if(LOCAL_COVERAGE_TEST)
- find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
- endif()
- set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
- )
+if(LOCAL_MEMCHECK_TEST)
+ find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
+else()
+ if(LOCAL_COVERAGE_TEST)
+ find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
endif()
+ set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ )
endif()
-
+
#-----------------------------------------------------------------------------
## -- set output to english
set($ENV{LC_MESSAGES} "en_EN")
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 8e3b7b0..580675e 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -1,7 +1,7 @@ #############################################################################################
### ${CTEST_SCRIPT_ARG} is of the form OPTION=VALUE ###
### BUILD_GENERATOR required [Unix, VS2015, VS201564, VS2013, VS201364, VS2012, VS201264] ###
-### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -V -O hdf5.log ###
+### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201264 -C Release -VV -O hdf5.log ###
#############################################################################################
cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR)
@@ -152,12 +152,28 @@ if(WIN32) ## Set the following to unique id your computer ##
set(CTEST_SITE "WIN7${BUILD_GENERATOR}.XXXX")
else()
+ set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
## Set the following to unique id your computer ##
if(APPLE)
set(CTEST_SITE "MAC.XXXX")
else()
set(CTEST_SITE "LINUX.XXXX")
endif()
+ if(APPLE)
+ execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(ENV{CC} "${XCODE_CC}")
+ set(ENV{CXX} "${XCODE_CXX}")
+ set(CTEST_USE_LAUNCHERS 1)
+ set(RR_WARNINGS_COMMON "-Wno-format-nonliteral -Wno-cast-align -Wno-unused -Wno-unused-variable -Wno-unused-function -Wno-self-assign -Wno-unused-parameter -Wno-sign-compare")
+ set(RR_WARNINGS_C "${RR_WARNINGS_COMMON} -Wno-deprecated-declarations -Wno-uninitialized")
+ set(RR_WARNINGS_CXX "${RR_WARNINGS_COMMON} -Woverloaded-virtual -Wshadow -Wwrite-strings -Wc++11-compat")
+ set(RR_FLAGS_COMMON "-g -O0 -fstack-protector-all -D_FORTIFY_SOURCE=2")
+ set(RR_FLAGS_C "${RR_FLAGS_COMMON}")
+ set(RR_FLAGS_CXX "${RR_FLAGS_COMMON}")
+ set(ENV{CFLAGS} "${RR_WARNINGS_C} ${RR_FLAGS_C}")
+ set(ENV{CXXFLAGS} "${RR_WARNINGS_CXX} ${RR_FLAGS_CXX}")
+ endif()
endif()
###################################################################
@@ -178,16 +194,14 @@ set(MODEL "Experimental") #set(LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
#set(LOCAL_UPDATE "TRUE")
-set(REPOSITORY_URL "http://svn.hdfgroup.uiuc.edu/hdf5/trunk")
+set(REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
+set(REPOSITORY_BRANCH "develop")
+
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows
#set(CTEST_USE_TAR_SOURCE "${CTEST_SOURCE_VERSION}")
###################################################################
###################################################################
-#### Change default configuration of options in config/cmake/cacheinit.cmake file ###
-#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ")
-
-###################################################################
if(${STATICLIBRARIES})
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF")
######### Following describes computer ############
@@ -195,26 +209,15 @@ if(${STATICLIBRARIES}) set(SITE_BUILDNAME_SUFFIX "STATIC")
endif()
###################################################################
-
-### uncomment/comment and change the following lines for other configuration options
-
-#### ext libraries ####
-### ext libs from tgz
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}")
-### ext libs from svn
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=SVN")
-### ext libs on system
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include")
-### disable ext libs building
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF")
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF")
#### fortran ####
if(${FORTRANLIBRARIES})
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=ON")
+ ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=ON")
else()
set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_FORTRAN:BOOL=OFF")
+ ### enable Fortran 2003 depends on HDF5_BUILD_FORTRAN
+ set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_F2003:BOOL=OFF")
endif()
#### java ####
if(${JAVALIBRARIES})
@@ -223,57 +226,53 @@ else() set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_BUILD_JAVA:BOOL=OFF")
endif()
-### disable test program builds
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF")
-
-### disable packaging
-#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON")
-### Create install package with external libraries (szip, zlib, jpeg)
-set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON")
-
### change install prefix
-set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
-set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_INSTALL_PREFIX:PATH=${INSTALLDIR}")
+set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCTEST_CONFIGURATION_TYPE:STRING=$ENV{CMAKE_CONFIG_TYPE}")
###################################################################
if(WIN32)
+ set(BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}")
+ include(${CTEST_SCRIPT_DIRECTORY}\\HDF5options.cmake)
include(${CTEST_SCRIPT_DIRECTORY}\\CTestScript.cmake)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe")
+ file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.exe" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi")
+ file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.msi" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip")
- file(COPY "${CTEST_BINARY_DIRECTORY}\\HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-win${SITE_OS_BITS}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip")
+ file(COPY "${CTEST_BINARY_DIRECTORY}\\${BINFILEBASE}.zip" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
else()
+ set(BINFILEBASE "HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}")
+ include(${CTEST_SCRIPT_DIRECTORY}/HDF5options.cmake)
include(${CTEST_SCRIPT_DIRECTORY}/CTestScript.cmake)
if(APPLE)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.dmg" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Darwin.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
else()
if(CYGWIN)
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-CYGWIN.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
else()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.sh" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
- if(EXISTS "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz")
- file(COPY "${CTEST_BINARY_DIRECTORY}/HDF5-${CTEST_SOURCE_VERSION}${CTEST_SOURCE_VERSEXT}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
+ if(EXISTS "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz")
+ file(COPY "${CTEST_BINARY_DIRECTORY}/${BINFILEBASE}-Linux.tar.gz" DESTINATION ${CTEST_SCRIPT_DIRECTORY})
endif()
endif()
endif()
diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake new file mode 100755 index 0000000..8f955e7 --- /dev/null +++ b/config/cmake/scripts/HDF5options.cmake @@ -0,0 +1,33 @@ +############################################################################################# +#### Change default configuration of options in config/cmake/cacheinit.cmake file ### +#### format: set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DXXX:YY=ZZZZ") ### +############################################################################################# + +### uncomment/comment and change the following lines for other configuration options + +############################################################################################# +#### ext libraries #### +### ext libs from tgz +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY}") +### ext libs from git +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=GIT") +### ext libs on system +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include") +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include") +### disable ext zlib building +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF") +### disable ext szip building +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF") +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_SZIP_ENCODING:BOOL=OFF") + +############################################################################################# +### disable test program builds +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_TESTING:BOOL=OFF") + +############################################################################################# +### disable packaging +#set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_NO_PACKAGES:BOOL=ON") +### Create install package with external libraries (szip, zlib, jpeg) +set(ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") + +############################################################################################# diff --git a/config/cmake_ext_mod/FindMPI.cmake b/config/cmake_ext_mod/FindMPI.cmake index 1a02f82..5e8084c 100644 --- a/config/cmake_ext_mod/FindMPI.cmake +++ b/config/cmake_ext_mod/FindMPI.cmake @@ -114,9 +114,10 @@ include(GetPrerequisites) # # Start out with the generic MPI compiler names, as these are most commonly used. -set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r) +set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r mpicc.bat) set(_MPI_CXX_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++ - mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r) + mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r + mpicxx.bat) set(_MPI_Fortran_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r mpif90 mpif90_r mpf90 mpf90_r mpif77 mpif77_r mpf77 mpf77_r) @@ -128,9 +129,9 @@ set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpig77 mpig77_r mpg77 mpg77_r) # Intel MPI compiler names -set(_MPI_Intel_C_COMPILER_NAMES mpiicc) -set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC) -set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77) +set(_MPI_Intel_C_COMPILER_NAMES mpiicc mpiicc.bat) +set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC mpiicpc.bat) +set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77 mpiifort.bat) # PGI compiler names set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc) @@ -315,7 +316,7 @@ function (interrogate_mpi_compiler lang try_libs) foreach(FLAG ${MPI_ALL_COMPILE_FLAGS}) if (MPI_COMPILE_FLAGS_WORK) - string(APPEND MPI_COMPILE_FLAGS_WORK " ${FLAG}") + set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}") else() set(MPI_COMPILE_FLAGS_WORK ${FLAG}) endif() @@ -326,6 +327,8 @@ function (interrogate_mpi_compiler lang try_libs) foreach(IPATH ${MPI_ALL_INCLUDE_PATHS}) string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH}) string(REPLACE "//" "/" IPATH ${IPATH}) + string(REPLACE "\"" "" IPATH ${IPATH}) + file(TO_CMAKE_PATH "${IPATH}" IPATH) list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH}) endforeach() @@ -364,7 +367,7 @@ function (interrogate_mpi_compiler lang try_libs) set(MPI_LINK_FLAGS_WORK) foreach(FLAG ${MPI_ALL_LINK_FLAGS}) if (MPI_LINK_FLAGS_WORK) - string(APPEND MPI_LINK_FLAGS_WORK " ${FLAG}") + set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}") else() set(MPI_LINK_FLAGS_WORK ${FLAG}) endif() @@ -386,8 +389,7 @@ function (interrogate_mpi_compiler lang try_libs) # in the showme list that can only be found in the implicit # link directories of the compiler. if (DEFINED CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES) - string(APPEND MPI_LINK_PATH - ";${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}") + set(MPI_LINK_PATH "${MPI_LINK_PATH};${CMAKE_${lang}_IMPLICIT_LINK_DIRECTORIES}") endif () # Determine full path names for all of the libraries that one needs @@ -466,7 +468,7 @@ function (interrogate_mpi_compiler lang try_libs) if (MPI_INCLUDE_PATH_WORK AND MPI_HEADER_PATH) list(APPEND MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH}) endif() - + set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) find_library(MPI_LIB NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 804c80f..0a77dae 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -144,6 +144,13 @@ if (TEST_FILTER) file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}") endif () +if (TEST_REF_FILTER) + #message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}") + file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) + STRING(REGEX REPLACE "${TEST_REF_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}") + file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") +endif (TEST_REF_FILTER) + # compare output files to references unless this must be skipped if (NOT TEST_SKIP_COMPARE) if (WIN32 AND NOT MINGW) @@ -151,11 +158,22 @@ if (NOT TEST_SKIP_COMPARE) file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}") endif () - # now compare the output with the reference - execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} - RESULT_VARIABLE TEST_RESULT - ) + if (NOT TEST_SORT_COMPARE) + # now compare the output with the reference + execute_process ( + COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} + RESULT_VARIABLE TEST_RESULT + ) + else () + file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} v1) + file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} v2) + list (SORT v1) + list (SORT v2) + if (NOT v1 STREQUAL v2) + set(TEST_RESULT 1) + endif () + endif () + if (NOT ${TEST_RESULT} STREQUAL 0) set (TEST_RESULT 0) file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act) diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index ae88ebc..2e4ebc8 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -4,7 +4,7 @@ PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- # Setup include Directories #----------------------------------------------------------------------------- -INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src) +INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src ${MPI_Fortran_INCLUDE_PATH}) #----------------------------------------------------------------------------- # Add Tests @@ -22,7 +22,7 @@ target_link_libraries (parallel_test ${HDF5_F90_TEST_LIB_TARGET} ${HDF5_F90_LIB_TARGET} ${HDF5_LIB_TARGET} - ${MPI_Fortran_LIBRARIES} + ${LINK_Fortran_LIBS} ) if (WIN32 AND MSVC) target_link_libraries (parallel_test "ws2_32.lib") diff --git a/test/cache_image.c b/test/cache_image.c index c91914d..946d46b 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -6305,6 +6305,13 @@ cache_image_api_error_check_3(void) if ( pass ) { + if ( H5Fclose(file_id) < 0 ) { + + pass = FALSE; + failure_mssg = "H5Fclose() failed.\n"; + + } + if ( HDremove(filename) < 0 ) { pass = FALSE; diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index d098746..064e1dd 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -370,13 +370,18 @@ -D "TEST_ARGS:STRING=${ARGN}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/PAR/testfiles" -D "TEST_OUTPUT=${resultfile}.out" - -D "TEST_EXPECT=${resultcode}" + -D "TEST_EXPECT=0" -D "TEST_REFERENCE=${resultfile}.txt" -# -D "TEST_APPEND=EXIT CODE: [0-9]" -# -D "TEST_REF_FILTER=EXIT CODE: 0" - -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_APPEND=EXIT CODE:" + -D "TEST_REF_APPEND=EXIT CODE: [0-9]" + -D "TEST_REF_FILTER=EXIT CODE: 0" + -D "TEST_SORT_COMPARE=TRUE" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test}) + endif () + set (last_test "PH5DIFF-${resultfile}") endif () ENDMACRO () |