# Link against the gmxapi libraries and get access to its public (installed) headers.
target_link_libraries(gmxapi-test PRIVATE Gromacs::gmxapi mdrun_test_infrastructure)
-gmx_register_gtest_test(GmxapiExternalInterfaceTests gmxapi-test OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(GmxapiExternalInterfaceTests gmxapi-test OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
set_tests_properties(GmxapiExternalInterfaceTests PROPERTIES
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(gmxapi-mpi-test PRIVATE Gromacs::gmxapi mdrun_test_infrastructure)
-gmx_register_gtest_test(GmxapiMpiTests gmxapi-mpi-test MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(GmxapiMpiTests gmxapi-mpi-test MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
target_link_libraries(workflow-details-test PRIVATE Gromacs::gmxapi gmxapi-detail mdrun_test_infrastructure)
-gmx_register_gtest_test(GmxapiInternalInterfaceTests workflow-details-test OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(GmxapiInternalInterfaceTests workflow-details-test OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
set_tests_properties(GmxapiInternalInterfaceTests PROPERTIES
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(workflow-details-mpi-test PRIVATE Gromacs::gmxapi gmxapi-detail mdrun_test_infrastructure)
-gmx_register_gtest_test(GmxapiInternalsMpiTests workflow-details-mpi-test MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(GmxapiInternalsMpiTests workflow-details-mpi-test MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
gmx_mindist.cpp
gmx_msd.cpp
)
-gmx_register_gtest_test(GmxAnaTest ${exename} INTEGRATION_TEST)
\ No newline at end of file
+gmx_register_gtest_test(GmxAnaTest ${exename} INTEGRATION_TEST IGNORE_LEAKS)
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-gmx_add_unit_test(GmxPreprocessTests gmxpreprocess-test
+gmx_add_gtest_executable(gmxpreprocess-test
CPP_SOURCE_FILES
editconf.cpp
genconf.cpp
solvate.cpp
topdirs.cpp
)
+gmx_register_gtest_test(GmxPreprocessTests gmxpreprocess-test SLOW_TEST)
# Currently these can be slow to run in Jenkins, so they are in
# several test binaries.
pdb2gmx.cpp
)
target_compile_definitions(${exename} PRIVATE OPLSAA=1 GROMOS=0 AMBER=0 CHARMM=0)
-gmx_register_gtest_test(Pdb2gmx1Test ${exename})
+gmx_register_gtest_test(Pdb2gmx1Test ${exename} SLOW_TEST)
set(exename pdb2gmx2-test)
gmx_add_gtest_executable(${exename}
pdb2gmx.cpp
)
target_compile_definitions(${exename} PRIVATE OPLSAA=0 GROMOS=1 AMBER=0 CHARMM=0)
-gmx_register_gtest_test(Pdb2gmx2Test ${exename})
+gmx_register_gtest_test(Pdb2gmx2Test ${exename} SLOW_TEST)
set(exename pdb2gmx3-test)
gmx_add_gtest_executable(${exename}
pdb2gmx.cpp
)
target_compile_definitions(${exename} PRIVATE OPLSAA=0 GROMOS=0 AMBER=1 CHARMM=1)
-gmx_register_gtest_test(Pdb2gmx3Test ${exename})
+gmx_register_gtest_test(Pdb2gmx3Test ${exename} SLOW_TEST)
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-gmx_add_unit_test(ToolUnitTests tool-test
+gmx_add_gtest_executable(tool-test
CPP_SOURCE_FILES
dump.cpp
report_methods.cpp
trjconv.cpp
)
-
+gmx_register_gtest_test(ToolUnitTests tool-test SLOW_TEST)
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-gmx_add_unit_test(TrajectoryAnalysisUnitTests trajectoryanalysis-test
+gmx_add_gtest_executable(trajectoryanalysis-test
CPP_SOURCE_FILES
# Infrastructure
moduletest.cpp
trajectory.cpp
unionfind.cpp
)
+gmx_register_gtest_test(TrajectoryAnalysisUnitTests trajectoryanalysis-test SLOW_TEST)
target_link_libraries(trajectoryanalysis-test PRIVATE analysisdata-test-shared)
add_executable(test_selection ${UNITTEST_TARGET_OPTIONS} test_selection.cpp)
$<TARGET_OBJECTS:mdrun_objlib>
)
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
-gmx_register_gtest_test(${testname} ${exename} OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(${testname} ${exename} OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
# To avoid running into test timeouts, some end-to-end tests of mdrun
# functionality are split off. This can be rearranged in future as we
$<TARGET_OBJECTS:mdrun_objlib>
)
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
-gmx_register_gtest_test(${testname} ${exename} OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(${testname} ${exename} OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
# TPI does not support OpenMP, so we need a separate test binary
set(testname "MdrunTpiTests")
$<TARGET_OBJECTS:mdrun_objlib>
)
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
-gmx_register_gtest_test(${testname} ${exename} INTEGRATION_TEST)
+gmx_register_gtest_test(${testname} ${exename} INTEGRATION_TEST IGNORE_LEAKS)
# Tests that only make sense to run with multiple ranks and/or real
# MPI are implemented here.
$<TARGET_OBJECTS:mdrun_objlib>
)
target_link_libraries(${exename} PRIVATE mdrun_test_infrastructure)
-gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST)
+gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 OPENMP_THREADS 2 INTEGRATION_TEST IGNORE_LEAKS)
# Slow-running tests that target testing multiple-rank coordination behaviors
set(exename "mdrun-mpi-coordination-test")
# with OpenMP enabled.
if (CMAKE_BUILD_TYPE MATCHES "Rel" AND GMX_OPENMP)
set(testname "MdrunMpiCoordinationTestsOneRank")
- gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST)
+ gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 1 SLOW_TEST IGNORE_LEAKS)
set(testname "MdrunMpiCoordinationTestsTwoRanks")
- gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 SLOW_TEST)
+ gmx_register_gtest_test(${testname} ${exename} MPI_RANKS 2 SLOW_TEST IGNORE_LEAKS)
endif()
# INTEGRATION_TEST requires the use of the IntegrationTest label in CTest
# SLOW_TEST requires the use of the SlowTest label in CTest, and
# increase the length of the ctest timeout.
+# IGNORE_LEAKS Skip some memory safety checks.
#
# TODO When a test case needs it, generalize the MPI_RANKS mechanism so
# that ctest can run the test binary over a range of numbers of MPI
# ranks.
function (gmx_register_gtest_test NAME EXENAME)
if (GMX_BUILD_UNITTESTS AND BUILD_TESTING)
- set(_options INTEGRATION_TEST SLOW_TEST)
+ set(_options INTEGRATION_TEST SLOW_TEST IGNORE_LEAKS)
set(_one_value_args MPI_RANKS OPENMP_THREADS)
cmake_parse_arguments(ARG "${_options}" "${_one_value_args}" "" ${ARGN})
set(_xml_path ${CMAKE_BINARY_DIR}/Testing/Temporary/${NAME}.xml)
else()
set(_timeout 120)
endif()
- gmx_get_test_prefix_cmd(_prefix_cmd IGNORE_LEAKS)
elseif (ARG_SLOW_TEST)
list(APPEND _labels SlowTest)
set(_timeout 480)
- gmx_get_test_prefix_cmd(_prefix_cmd IGNORE_LEAKS)
else()
list(APPEND _labels UnitTest)
gmx_get_test_prefix_cmd(_prefix_cmd)
endif()
+ if (ARG_IGNORE_LEAKS)
+ gmx_get_test_prefix_cmd(_prefix_cmd IGNORE_LEAKS)
+ endif ()
set(_cmd ${_prefix_cmd} $<TARGET_FILE:${EXENAME}>)
if (ARG_OPENMP_THREADS)
if (GMX_OPENMP)