Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,36 @@ list(APPEND STLASAN_LIT_COMMAND "${STL_LIT_OUTPUT}"
"-D" "tags=ASAN"
"${STL_LIT_TEST_DIRS}")

add_test(NAME stl COMMAND ${Python_EXECUTABLE} ${STL_LIT_COMMAND} COMMAND_EXPAND_LISTS)
add_test(NAME stlasan COMMAND ${Python_EXECUTABLE} ${STLASAN_LIT_COMMAND} COMMAND_EXPAND_LISTS)
set_tests_properties(stl stlasan PROPERTIES RUN_SERIAL ON)
# libcxx will be handled differently, because they use their own runner
foreach(DIR std tr1)
file(GLOB globbed_dirs
LIST_DIRECTORIES ON
"${DIR}/tests/*")
foreach(test_dir ${globbed_dirs})
# There are some .lst files alongside the directories
if (NOT IS_DIRECTORY ${test_dir})
continue()
endif()
get_filename_component(just_folder ${test_dir} NAME)
add_test(NAME "${DIR}::${just_folder}"
COMMAND ${Python_EXECUTABLE} ${STL_LIT_OUTPUT} ${LIT_FLAGS} "-o" "${CMAKE_CURRENT_BINARY_DIR}/test_results_${DIR}_${just_folder}.json" "-D" "notags=ASAN" ${test_dir})
set_tests_properties("${DIR}::${just_folder}"
PROPERTIES
RUN_SERIAL ON
LABELS "${DIR}"
)
add_test(NAME "${DIR}::${just_folder}::ASAN"
COMMAND ${Python_EXECUTABLE} ${STL_LIT_OUTPUT} ${LIT_FLAGS} "-o" "${CMAKE_CURRENT_BINARY_DIR}/test_results_${DIR}_${just_folder}_asan.json" "-D" "tags=ASAN" ${test_dir})
set_tests_properties("${DIR}::${just_folder}::ASAN"
PROPERTIES
RUN_SERIAL ON
LABELS "${DIR};asan"
)
endforeach()
endforeach()


# TODO: explicitly add libcxx the way it was done before
#add_test(NAME stl COMMAND ${Python_EXECUTABLE} ${STL_LIT_COMMAND} COMMAND_EXPAND_LISTS)
#add_test(NAME stlasan COMMAND ${Python_EXECUTABLE} ${STLASAN_LIT_COMMAND} COMMAND_EXPAND_LISTS)
#set_tests_properties(stl stlasan PROPERTIES RUN_SERIAL ON)