Skip to content

Commit 07155ce

Browse files
committed
Add RUN_DEVELOPER_TESTS build option, fixes #342
- Check environment for OPENCOARRAYS_DEVELOPER and enable RUN_DEVELOPER_TESTS by default if found - Otherwise it is marked as an advanced option and is OFF by default
1 parent 045737a commit 07155ce

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

CMakeLists.txt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ set ( CMAKE_BUILD_TYPE "Release"
66
CACHE STRING "Select which configuration to build." )
77
set_property ( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
88

9+
# Add option and check environment to determine if developer tests should be run
10+
if(ENV{OPENCOARRAYS_DEVELOPER})
11+
option(RUN_DEVELOPER_TESTS "Run tests intended only for developers" ON)
12+
else()
13+
option(RUN_DEVELOPER_TESTS "Run tests intended only for developers" OFF)
14+
endif()
15+
mark_as_advanced(RUN_DEVELOPER_TESTS)
16+
917
# Name project and specify source languages
1018
# Parse version from .VERSION file so that more info can be added and easier to get from scripts
1119
file( STRINGS ".VERSION" OpenCoarraysVersion
@@ -468,10 +476,12 @@ if(opencoarrays_aware_compiler)
468476
add_mpi_test(register_alloc_comp_1 2 ${tests_root}/unit/init_register/register_alloc_comp_1)
469477
add_mpi_test(register_alloc_comp_2 2 ${tests_root}/unit/init_register/register_alloc_comp_2)
470478
add_mpi_test(register_alloc_comp_3 2 ${tests_root}/unit/init_register/register_alloc_comp_3)
471-
add_mpi_test(async_comp_alloc 6 ${tests_root}/unit/init_register/async_comp_alloc)
472-
# Timeout async_comp_alloc test after 3 seconds to progess past the known failure
473-
set_property(TEST async_comp_alloc PROPERTY TIMEOUT_AFTER_MATCH 3 "known failure")
474-
set_property(TEST async_comp_alloc PROPERTY TIMEOUT 6) # in the event old CMake is being used
479+
if (RUN_DEVELOPER_TESTS)
480+
add_mpi_test(async_comp_alloc 6 ${tests_root}/unit/init_register/async_comp_alloc)
481+
# Timeout async_comp_alloc test after 3 seconds to progess past the known failure
482+
set_property(TEST async_comp_alloc PROPERTY TIMEOUT_AFTER_MATCH 3 "known failure")
483+
set_property(TEST async_comp_alloc PROPERTY TIMEOUT 6) # in the event old CMake is being used
484+
endif()
475485
endif()
476486
add_mpi_test(get_array 2 ${tests_root}/unit/send-get/get_array)
477487
add_mpi_test(get_self 2 ${tests_root}/unit/send-get/get_self)
@@ -508,7 +518,9 @@ if(opencoarrays_aware_compiler)
508518
# GFortran PR 78505 only fixed on trunk/gcc 7
509519
add_mpi_test(source-alloc-no-sync 8 ${tests_root}/regression/reported/source-alloc-sync)
510520
endif()
511-
add_mpi_test(convert-before-put 3 ${tests_root}/regression/reported/convert-before-put)
521+
if (RUN_DEVELOPER_TESTS)
522+
add_mpi_test(convert-before-put 3 ${tests_root}/regression/reported/convert-before-put)
523+
endif()
512524
add_mpi_test(event-post 3 ${tests_root}/regression/reported/event-post)
513525
add_mpi_test(co_reduce-factorial 4 ${tests_root}/regression/reported/co_reduce-factorial)
514526
add_mpi_test(co_reduce-factorial-int8 4 ${tests_root}/regression/reported/co_reduce-factorial-int8)

0 commit comments

Comments
 (0)