1# Passed to lit.site.cfg.py.in to set up the path where to find the libraries. 2set(MLIR_INTEGRATION_TEST_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) 3 4set(MLIR_INTEGRATION_TEST_DEPENDS 5 FileCheck count not 6 mlir-cpu-runner 7 mlir-opt 8 mlir_runner_utils 9 mlir_c_runner_utils 10 ) 11 12configure_lit_site_cfg( 13 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in 14 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py 15 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py 16 ) 17 18add_lit_testsuite(check-mlir-integration "Running the MLIR integration tests" 19 ${CMAKE_CURRENT_BINARY_DIR} 20 DEPENDS ${MLIR_INTEGRATION_TEST_DEPENDS} 21 ) 22set_target_properties(check-mlir-integration PROPERTIES FOLDER "integration_test") 23 24# Let target "check-mlir" imply the target "check-mlir-integration" as well, 25# provided that MLIR_INCLUDE_INTEGRATION_TESTS=ON during the initial setup. 26add_dependencies(check-mlir check-mlir-integration) 27 28add_lit_testsuites(MLIR_INTEGRATION ${CMAKE_CURRENT_SOURCE_DIR} 29 DEPENDS ${MLIR_INTEGRATION_TEST_DEPENDS} 30 ) 31 32# Copy test data over. 33file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/test.mtx 34 DESTINATION ${MLIR_INTEGRATION_TEST_DIR}/data/) 35