Skip to content
Merged
Show file tree
Hide file tree
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
17 changes: 16 additions & 1 deletion llvm/cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,12 @@ endfunction()

function(add_lit_testsuites project directory)
if (NOT LLVM_ENABLE_IDE)
cmake_parse_arguments(ARG "EXCLUDE_FROM_CHECK_ALL" "FOLDER;BINARY_DIR" "PARAMS;DEPENDS;ARGS" ${ARGN})
cmake_parse_arguments(ARG
"EXCLUDE_FROM_CHECK_ALL"
"FOLDER;BINARY_DIR"
"PARAMS;DEPENDS;ARGS;SKIP"
${ARGN}
)

if (NOT ARG_FOLDER)
get_subproject_title(subproject_title)
Expand All @@ -2214,6 +2219,16 @@ function(add_lit_testsuites project directory)

# Create a check- target for the directory.
string(REPLACE "${directory}/" "" name_slash ${lit_suite})
set(_should_skip FALSE)
foreach(skip IN LISTS ARG_SKIP)
if(name_slash MATCHES "${skip}")
set(_should_skip TRUE)
break()
endif()
endforeach()
if (_should_skip)
continue()
endif()
if (name_slash)
set(filter ${name_slash})
string(REPLACE "/" "-" name_slash ${name_slash})
Expand Down
1 change: 1 addition & 0 deletions mlir/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,5 @@ add_lit_testsuite(check-mlir "Running the MLIR regression tests"

add_lit_testsuites(MLIR ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${MLIR_TEST_DEPENDS}
SKIP "^python*"
)
9 changes: 9 additions & 0 deletions mlir/test/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ mlir_tablegen(lib/PythonTestTypes.cpp.inc -gen-typedef-defs)
add_public_tablegen_target(MLIRPythonTestIncGen)

add_subdirectory(lib)

set(MLIR_PYTHON_TEST_DEPENDS MLIRPythonModules)
if(NOT MLIR_STANDALONE_BUILD)
list(APPEND MLIR_PYTHON_TEST_DEPENDS FileCheck count)
endif()
add_lit_testsuite(check-mlir-python "Running the MLIR Python regression tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${MLIR_PYTHON_TEST_DEPENDS}
)