forked from weaselab/conflict-set
Make the skip list corpus tests opt-in, not default
Review feedback: running the skip list tests on every default ctest run is a waste of time. Gate them behind a TEST_SKIP_LIST CMake option, off by default, so they remain easy to run when cross-checking SkipList.cpp against ReferenceImpl. Verified with -DTEST_SKIP_LIST=ON: all 2845 skip_list corpus tests pass; the default test list is unchanged.
This commit is contained in:
1 parent
8b6389236a
commit
56e0673fc7
1 file changed
+10
-5
+10
-5
@@ -182,6 +182,8 @@ endif()
|
||||
|
||||
include(CTest)
|
||||
|
||||
option(TEST_SKIP_LIST "Run the slow skip list cross-check tests" OFF)
|
||||
|
||||
# disable tests if this is being used through e.g. FetchContent
|
||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
||||
|
||||
@@ -224,11 +226,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
||||
target_compile_options(driver_skip_list PRIVATE ${TEST_FLAGS})
|
||||
target_link_libraries(driver_skip_list PRIVATE skip_list)
|
||||
|
||||
# skip list tests, which cross-check SkipList.cpp against ReferenceImpl
|
||||
foreach(TEST ${CORPUS_TESTS})
|
||||
get_filename_component(hash ${TEST} NAME)
|
||||
add_test(NAME skip_list_${hash} COMMAND driver_skip_list ${TEST})
|
||||
endforeach()
|
||||
# Optional cross-check of SkipList.cpp against ReferenceImpl. Opt-in via
|
||||
# -DTEST_SKIP_LIST=ON, since these are slow.
|
||||
if(TEST_SKIP_LIST)
|
||||
foreach(TEST ${CORPUS_TESTS})
|
||||
get_filename_component(hash ${TEST} NAME)
|
||||
add_test(NAME skip_list_${hash} COMMAND driver_skip_list ${TEST})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# ad hoc testing
|
||||
add_executable(conflict_set_main ConflictSet.cpp)
|
||||
|
||||
Reference in new issue
Block a user