Files
hdf5/config/cmake/scripts/CTestScript.cmake
T
jhendersonHDF fb84c696a4 Sync 1.14 branch with develop (#3887)
* Preserve MPI-I/O file hints when fapl is closed (#3755)

* Fix for issue #3025: Save the MPI info in the file struct so H5Fget_access_plist() can retrieve it from there.

* Add compression tests for subfiling (#3769)

* Fix typo in comment (#3775)

* Fixed a file handle leak in the core VFD (#3779)

When opening a file with the core VFD and a file image, if the file
already exists, the file check would leak the POSIX file handle.

Fixes GitHub issue #635

* Fix a format string warning in the C++ examples (#3776)

* Cancel running GitHub workflows on push to same PR (#3772)

* Cancel running GitHub workflows on push to same PR

* Remove github.sha from workflow concurrency groups

* Print some messages in parallel tests on MPI rank 0 only (#3785)

Avoids overly verbose output from all processes emitting progress, etc. info.

* Avoid attempted use of NULL pointer in parallel compression code (#3786)

The parallel compression test code tests for the case where all MPI ranks have no selection in a dataset when writing to it. Add an early exit to the code to avoid attempting to use a NULL pointer due to there being no work to do.

* Don't install h5tools_test_utils test program on system (#3793)

* Add Doxygen to H5FDsplitter.h (#3794)

* H5FD_CURR_SPLITTER_VFD_CONFIG_VERSION
* H5FD_SPLITTER_PATH_MAX
* H5FD_SPLITTER_MAGIC
* H5FD_splitter_vfd_config_t
* H5Pset_fapl_splitter()
* H5Pget_fapl_splitter()

* Update Doxygen initializers & identifiers in VFDs (#3795)

* Add Doxygen for all H5FD_<VFD> initializers
* Add Doxygen for all H5FD_<VFD>_VALUE values
* Mark H5FD_<vfd>_init() calls private in Doxygen

* Fix memory corruption in 'MPI I/O FAPL preserve' test (#3806)

* Fix usage of h5_clean_files in t_pflush2.c (#3807)

* Fix parallel driver check in h5_fixname_real (#3808)

* Fix a couple usages of MPI_Info_get (#3809)

* Remove H5system.c warning on Windows oneAPI. (#3812)

* Add processing of NVHPC flags in linux-gnulibc1 file (#3804)

* Disable testing as tests are failing the same as in CMake

* Use the current toolchain for examples as default (#3810)

* Fix misc. warnings from GCC when compiling with -fsanitize=undefined (#3787)

* Set NVHPC maximum optimization level to -O1 for now (#3800)

* Set NVHPC maximum optimization level to -O1 for now

Compiling HDF5 with NVHPC 23.5 - 23.9 results in test failures in
4 different test files that need to be resolved. Since those tests
pass with an optimization level of -O1 (and -O0) and it is currently
unclear whether the test failures are due to issues in HDF5 or issues
in the 'nvc' compiler, set the maximum optimization level for NVHPC
to -O1 until the test failures are resolved.

* Disable nvhpc Java testing in CMake and amend known issues

* Re-enable testing of Autotools nvhpc

* Update some doxygen links to local refs (#3814)

* Rework MPI Info FAPL preserve PR to use VFD 'ctl' operations (#3782)

* Removed the use of C wrappers from H5P APIs. (#3824)

* fix seg fault on frontier/cray

* fix seg fault on frontier/cray

* fix seg fault on frontier/cray

* removed the use of h5pclose_c

* removed the use of h5pclose_c

* Fortran Wrappers H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f (#3801)

* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f

* Added H5VLnative_addr_to_token_f and H5VLnative_token_to_address_f tests

* Create test for H5Pget_dxpl_mpio (#3825)

* Create test and add to testphdf5

* Renamed h5fuse.sh to h5fuse (#3834)

* provide an alternative to mapfile for older bash

* Disable FP exceptions in H5T init code (#3837)

The H5T floating-point datatype initialization code can raise exceptions when handling signaling NaNs. This change disables FE_INVALID exceptions during initialization.

Also removes the -ieee=full change for NAG Fortran as that shouldn't be necessary anymore.

Fixes #3831

* Add intel oneapi windows build to CI CMake (#3836)

* Remove printf format warning on Windows oneAPI. (#3838)

* Correct ENV variables (#3841)

* Remove Autotools sed hack (#3848)

configure.ac contains a sed line that cleans up incorrect library
flags which was added to paper over some bugs in earlier versions
of the Autotools. These issues are not a problem with the current
versions of the Autootols.

The sed line causes problems on MacOS, so it has been removed.

Fixes #3843

* Make filter unregister callbacks safe for VOL connectors (#3629)

* Make filter callbacks use top-level API functions

When using VOL connectors, H5I_iterate may not provide
valid object pointers to its callback. This change keeps
existing functionality in H5Zunregister() without using
potentially unsafe pointers.

* Filter callbacks use internal API

* Skip MPI work on non-native VOL

* Add extra space in comments for consistency (#3852)

* Add extra space in comments for consistency

* uncomment tfloatsattrs test

* Update Actions badges to link to relevant workflow (#3850)

* Add CMake long double cross-compile defaults (#3683)

HDF5 performs a couple of checks at build time to see if long double
values can be converted correctly (IBM's Power architecture uses a
special format for long doubles). These checks were performed using
TRY_RUN, which is a problem when cross-compiling.

These checks now use default values appropriate for most non-Power
systems when cross-compiling. The cache values can be pre-set if
necessary, which will preempt both the TRY_RUN and the default.

Affected values:
    H5_LDOUBLE_TO_LONG_SPECIAL      (default no)
    H5_LONG_TO_LDOUBLE_SPECIAL      (default no)
    H5_LDOUBLE_TO_LLONG_ACCURATE    (default yes)
    H5_LLONG_TO_LDOUBLE_CORRECT     (default yes)
    H5_DISABLE_SOME_LDOUBLE_CONV    (default no)

Fixes GitHub #3585

* Updates for building and testing VOL connectors

* Fix issue with HDF5_VOL_ALLOW_EXTERNAL CMake variable

* Initialize parallel testing with MPI_THREAD_MULTIPLE when testing API

* Add CMake variable to allow specifying a VOL connector's package name

* Remove call to MPI_Init in serial API tests

While previously necessary, it now interferes with VOL connectors that
may need to be initialized with MPI_THREAD_MULTIPLE

* Fixes for CI and presets (#3853)

* Change dest for doxygen (#3856)

* Implement selection vector I/O with collective chunk filling (#3826)

* Changes for ECP-344: Implement selection vector I/O with collective chunk filling.
Also fix a bug in H5FD__mpio_write_vector() to account for fixed size optimization
when computing max address.

* Fixes based on PR review comments:
For H5Dchunk.c: fix H5MM_xfree()
For H5FDmpio.c:
1) Revert the fix to H5FD__mpio_write_vector()
2) Apply the patch from Neil on the proper length of s_sizes reported by H5FD__mpio_vector_build_types()

* Put back the logic of dividing up the work among all the mpi ranks similar to the
original H5D__chunk_collective_fill() routine.

* Add a test to verify the fix for the illegal reference problem in H5FD__mpio_write_vector().

* Do not publish compression headers or docs (#3865)

* Fix typo: look -> loop (#3866)

* Moved the README to markdown and expanded its overview of the files, file generation, and other Fortran wrapper development practices as mentioned in the HDF5 architectural document. I added a new figure and included the SVG file and the original xfig file it was generated from. (#3862)

* Add HDF5_DISABLE_TESTS_REGEX option to skip tests (#3859)

* Fix typo in error message for `MPI_Type_dup`. (#3867)

* Complete the `if command line option` sentence. (#3868)

* Fix h5dump segmentation fault when --vfd-value option is used (#3873)

* Updated URL in funding.yml (#3882)

Using new shortened URL, might look better.

* Remove unused variable from unmerged changes

* Update src/H5Tinit_float.c
2023-12-07 12:13:21 -06:00

396 lines
16 KiB
CMake

#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
cmake_minimum_required (VERSION 3.18)
########################################################
# This dashboard is maintained by The HDF Group
# For any comments please contact cdashhelp@hdfgroup.org
#
########################################################
# -----------------------------------------------------------
# -- Get environment
# -----------------------------------------------------------
if (NOT SITE_OS_NAME)
## machine name not provided - attempt to discover with uname
## -- set hostname
## --------------------------
find_program (HOSTNAME_CMD NAMES hostname)
exec_program (${HOSTNAME_CMD} ARGS OUTPUT_VARIABLE HOSTNAME)
set (CTEST_SITE "${HOSTNAME}${CTEST_SITE_EXT}")
find_program (UNAME NAMES uname)
macro (getuname name flag)
exec_program ("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
endmacro ()
getuname (osname -s)
getuname (osrel -r)
getuname (cpu -m)
message (STATUS "Dashboard script uname output: ${osname}-${osrel}-${cpu}\n")
set (CTEST_BUILD_NAME "${osname}-${osrel}-${cpu}")
else ()
## machine name provided
## --------------------------
if (CMAKE_HOST_UNIX)
set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_OS_BITS}-${SITE_COMPILER_NAME}-${SITE_COMPILER_VERSION}")
else ()
set (CTEST_BUILD_NAME "${SITE_OS_NAME}-${SITE_OS_VERSION}-${SITE_COMPILER_NAME}")
endif ()
endif ()
if (SITE_BUILDNAME_SUFFIX)
set (CTEST_BUILD_NAME "${SITE_BUILDNAME_SUFFIX}-${CTEST_BUILD_NAME}")
endif ()
set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}")
# Launchers work only with Makefile and Ninja generators.
if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja" OR LOCAL_SKIP_TEST)
set(CTEST_USE_LAUNCHERS 0)
set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0)
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF")
else()
set(CTEST_USE_LAUNCHERS 1)
set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)
set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON")
endif()
#-----------------------------------------------------------------------------
# MAC machines need special option
#-----------------------------------------------------------------------------
if (APPLE)
# Compiler choice
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 (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
endif ()
#-----------------------------------------------------------------------------
set (NEED_REPOSITORY_CHECKOUT 0)
set (CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
if (CTEST_USE_TAR_SOURCE)
## Uncompress source if tar file provided
## --------------------------
if (WIN32 AND NOT MINGW)
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_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 ()
if (NOT rv EQUAL 0)
message (STATUS "extracting... [error-(${rv}) clean up]")
file (REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
message (FATAL_ERROR "error: extract of ${CTEST_USE_TAR_SOURCE} failed")
endif ()
file (RENAME ${CTEST_DASHBOARD_ROOT}/${CTEST_USE_TAR_SOURCE} ${CTEST_SOURCE_DIRECTORY})
set (LOCAL_SKIP_UPDATE "TRUE")
else ()
if (LOCAL_UPDATE)
if (CTEST_USE_GIT_SOURCE)
find_program (CTEST_GIT_COMMAND NAMES git git.cmd)
set (CTEST_GIT_UPDATE_OPTIONS)
if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
set (NEED_REPOSITORY_CHECKOUT 1)
endif ()
if (${NEED_REPOSITORY_CHECKOUT})
if (REPOSITORY_BRANCH)
set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" --branch \"${REPOSITORY_BRANCH}\" --single-branch \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
else ()
set (CTEST_GIT_options "clone \"${REPOSITORY_URL}\" \"${CTEST_SOURCE_DIRECTORY}\" --recurse-submodules")
endif ()
set (CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} ${CTEST_GIT_options}")
else ()
set (CTEST_GIT_options "pull")
endif ()
set (CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
else ()
## --------------------------
## use subversion to get source
#-----------------------------------------------------------------------------
## cygwin does not handle the find_package() call
## --------------------------
set (CTEST_UPDATE_COMMAND "SVNCommand")
if (NOT SITE_CYGWIN})
find_package (Subversion)
set (CTEST_SVN_COMMAND "${Subversion_SVN_EXECUTABLE}")
set (CTEST_UPDATE_COMMAND "${Subversion_SVN_EXECUTABLE}")
else ()
set (CTEST_SVN_COMMAND "/usr/bin/svn")
set (CTEST_UPDATE_COMMAND "/usr/bin/svn")
endif ()
if (NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
set (NEED_REPOSITORY_CHECKOUT 1)
endif ()
if (NOT CTEST_REPO_VERSION)
set (CTEST_REPO_VERSION "HEAD")
endif ()
if (${NEED_REPOSITORY_CHECKOUT})
set (CTEST_CHECKOUT_COMMAND
"\"${CTEST_SVN_COMMAND}\" co ${REPOSITORY_URL} \"${CTEST_SOURCE_DIRECTORY}\" -r ${CTEST_REPO_VERSION}")
else ()
if (CTEST_REPO_VERSION)
set (CTEST_SVN_UPDATE_OPTIONS "-r ${CTEST_REPO_VERSION}")
endif ()
endif ()
endif ()
endif ()
endif ()
#-----------------------------------------------------------------------------
## Clear the build directory
## --------------------------
set (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
if (NOT EXISTS "${CTEST_BINARY_DIRECTORY}")
file (MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
else ()
ctest_empty_binary_directory (${CTEST_BINARY_DIRECTORY})
endif ()
# Use multiple CPU cores to build
include (ProcessorCount)
ProcessorCount (N)
if (NOT N EQUAL 0)
if (MAX_PROC_COUNT)
if (N GREATER MAX_PROC_COUNT)
set (N ${MAX_PROC_COUNT})
endif ()
endif ()
if (NOT WIN32)
set (CTEST_BUILD_FLAGS -j${N})
endif ()
set (ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
endif ()
#-----------------------------------------------------------------------------
# Send the main script as a note.
list (APPEND CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}"
"${CMAKE_CURRENT_LIST_FILE}"
"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake"
)
if (EXISTS "${CTEST_SCRIPT_DIRECTORY}/SkipTests.log")
list(APPEND CTEST_NOTES_FILES
"${CTEST_SCRIPT_DIRECTORY}/SkipTests.log"
)
endif ()
#-----------------------------------------------------------------------------
# Check for required variables.
# --------------------------
foreach (req
CTEST_CMAKE_GENERATOR
CTEST_SITE
CTEST_BUILD_NAME
)
if (NOT DEFINED ${req})
message (FATAL_ERROR "The containing script must set ${req}")
endif ()
endforeach ()
#-----------------------------------------------------------------------------
# Initialize the CTEST commands
#------------------------------
if (CMAKE_GENERATOR_TOOLSET)
set (CTEST_CONFIGURE_TOOLSET "\"-T${CMAKE_GENERATOR_TOOLSET}\"")
else ()
set (CTEST_CONFIGURE_TOOLSET)
endif()
if (CMAKE_GENERATOR_ARCHITECTURE)
set (CTEST_CONFIGURE_ARCHITECTURE "\"-A${CMAKE_GENERATOR_ARCHITECTURE}\"")
else ()
set (CTEST_CONFIGURE_ARCHITECTURE)
endif()
if (LOCAL_MEMCHECK_TEST)
if(LOCAL_USE_VALGRIND)
set (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-v --tool=memcheck --leak-check=full --track-fds=yes --num-callers=50 --show-reachable=yes --track-origins=yes --malloc-fill=0xff --free-fill=0xfe")
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
endif()
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_CONFIGURE_ARCHITECTURE} ${CTEST_CONFIGURE_TOOLSET} \"${CTEST_SOURCE_DIRECTORY}\""
)
else ()
if (LOCAL_COVERAGE_TEST)
if(LOCAL_USE_GCOV)
find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
endif ()
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_CONFIGURE_ARCHITECTURE} ${CTEST_CONFIGURE_TOOLSET} \"${CTEST_SOURCE_DIRECTORY}\""
)
endif ()
#-----------------------------------------------------------------------------
## -- set output to english
set ($ENV{LC_MESSAGES} "en_EN")
# Print summary information.
foreach (v
CTEST_SITE
CTEST_BUILD_NAME
CTEST_SOURCE_DIRECTORY
CTEST_BINARY_DIRECTORY
CTEST_CMAKE_GENERATOR
CTEST_CONFIGURATION_TYPE
CTEST_GIT_COMMAND
CTEST_CHECKOUT_COMMAND
CTEST_CONFIGURE_COMMAND
CTEST_SCRIPT_DIRECTORY
CTEST_USE_LAUNCHERS
)
set (vars "${vars} ${v}=[${${v}}]\n")
endforeach ()
message (STATUS "Dashboard script configuration:\n${vars}\n")
#-----------------------------------------------------------------------------
###################################################################
######### Following is for submission to CDash ############
###################################################################
if (NOT DEFINED MODEL)
set (MODEL "Experimental")
endif ()
set (ENV{CI_SITE_NAME} ${CTEST_SITE})
set (ENV{CI_BUILD_NAME} ${CTEST_BUILD_NAME})
set (ENV{CI_MODEL} ${MODEL})
#-----------------------------------------------------------------------------
## NORMAL process
## -- LOCAL_UPDATE updates the source folder from svn
## -- LOCAL_SUBMIT reports to CDash server
## -- LOCAL_SKIP_TEST skips the test process (only builds)
## -- LOCAL_MEMCHECK_TEST executes the Valgrind testing
## -- LOCAL_COVERAGE_TEST executes code coverage process
## --------------------------
ctest_start (${MODEL} GROUP ${MODEL})
if (LOCAL_UPDATE)
ctest_update (SOURCE "${CTEST_SOURCE_DIRECTORY}")
endif ()
configure_file (${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake)
ctest_read_custom_files ("${CTEST_BINARY_DIRECTORY}")
ctest_configure (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
if (LOCAL_SUBMIT)
ctest_submit (PARTS Update Configure Notes)
endif ()
if (${res} LESS 0 OR ${res} GREATER 0)
file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Configure: ${res}\n")
endif ()
# On Cray XC40, configuring fails in the Fortran section when using the craype-mic-knl module.
# When the configure phase is done with the craype-haswell module and the build phase is done
# with the craype-mic-knl module, configure succeeds and tests pass on the knl compute nodes
# for Intel, Cray, GCC and Clang compilers. If the variables aren't set or if not
# cross compiling, the module switch will not occur.
if (CMAKE_CROSSCOMPILING AND COMPILENODE_HWCOMPILE_MODULE AND COMPUTENODE_HWCOMPILE_MODULE)
execute_process (COMMAND module switch ${COMPILENODE_HWCOMPILE_MODULE} ${COMPUTENODE_HWCOMPILE_MODULE})
endif ()
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND RETURN_VALUE res NUMBER_ERRORS errval)
if (LOCAL_SUBMIT)
ctest_submit (PARTS Build)
endif ()
if (${res} LESS 0 OR ${res} GREATER 0 OR ${errval} GREATER 0)
file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed ${errval} Build: ${res}\n")
endif ()
if (NOT LOCAL_SKIP_TEST)
if (NOT LOCAL_MEMCHECK_TEST)
if (NOT LOCAL_BATCH_TEST)
ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
else ()
file(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG TAG_CONTENTS REGEX "^2([0-9]+)[-]([0-9]+)$")
if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
else ()
if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "qsub")
execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME} ctestS.out)
else ()
execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME})
endif()
endif ()
message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/ctestS.done")
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/ctestS.done RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
while(result)
ctest_sleep(60)
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/ctestS.done RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
endwhile(result)
message(STATUS "Serial tests completed.")
if (LOCAL_SUBMIT)
ctest_submit (PARTS Test)
endif ()
if (LOCAL_BATCH_SCRIPT_PARALLEL_NAME)
unset(result CACHE)
if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "raybsub")
execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
else ()
if (LOCAL_BATCH_SCRIPT_COMMAND STREQUAL "qsub")
execute_process (COMMAND ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_NAME} ctestP.out)
else ()
execute_process (COMMAND ${LOCAL_BATCH_SCRIPT_COMMAND} ${LOCAL_BATCH_SCRIPT_ARGS} ${CTEST_BINARY_DIRECTORY}/${LOCAL_BATCH_SCRIPT_PARALLEL_NAME})
endif ()
endif ()
message(STATUS "Check for existence of ${CTEST_BINARY_DIRECTORY}/ctestP.done")
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/ctestP.done RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
while(result)
ctest_sleep(60)
execute_process(COMMAND ls ${CTEST_BINARY_DIRECTORY}/ctestP.done RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
endwhile(result)
message(STATUS "parallel tests completed.")
endif()
endif ()
if (LOCAL_SUBMIT)
ctest_submit (PARTS Test)
endif ()
if (${res} LESS 0 OR ${res} GREATER 0)
file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed Tests: ${res}\n")
endif ()
else ()
ctest_memcheck (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args})
if (LOCAL_SUBMIT)
ctest_submit (PARTS MemCheck)
endif ()
endif ()
if (LOCAL_COVERAGE_TEST)
ctest_coverage (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
if (LOCAL_SUBMIT)
ctest_submit (PARTS Coverage)
endif ()
endif ()
if (LOCAL_SUBMIT)
ctest_submit (PARTS Done)
endif ()
endif ()
if (NOT LOCAL_MEMCHECK_TEST AND NOT LOCAL_NO_PACKAGE AND NOT LOCAL_SKIP_BUILD)
##-----------------------------------------------
## Package the product
##-----------------------------------------------
execute_process (COMMAND cpack -C ${CTEST_CONFIGURATION_TYPE} -V
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
RESULT_VARIABLE cpackResult
OUTPUT_VARIABLE cpackLog
ERROR_VARIABLE cpackLog.err
)
file (WRITE ${CTEST_BINARY_DIRECTORY}/cpack.log "${cpackLog.err}" "${cpackLog}")
if (cpackResult GREATER 0)
file (APPEND ${CTEST_SCRIPT_DIRECTORY}/FailedCTest.txt "Failed packaging: ${cpackResult}:${cpackLog.err} \n")
endif ()
endif ()
#-----------------------------------------------------------------------------