Move the MLIR integration tests as a subdirectory of test (NFC)
This does not change the behavior directly: the tests only run when
`-DMLIR_INCLUDE_INTEGRATION_TESTS=ON` is configured. However running
`ninja check-mlir` will not run all the tests within a single
lit invocation. The previous behavior would wait for all the integration
tests to complete before starting to run the first regular test. The
test results were also reported separately. This change is unifying all
of this and allow concurrent execution of the integration tests with
regular non-regression and unit-tests.
Differential Revision: https://reviews.llvm.org/D97241
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index 9a45b29..f5cb004 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -27,6 +27,19 @@
set(MLIR_SPIRV_WRAPPER_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
set(MLIR_VULKAN_WRAPPER_LIBRARY_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+if (MLIR_INCLUDE_INTEGRATION_TESTS)
+ set(INTEL_SDE_EXECUTABLE "" CACHE STRING
+ "If set, arch-specific integration tests are run with Intel SDE.")
+ option(MLIR_RUN_AVX512_TESTS "Run AVX512 tests.")
+ # Passed to lit.site.cfg.py.in to set up the path where to find the libraries.
+ set(MLIR_INTEGRATION_TEST_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
+
+ # Copy test data over.
+ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Integration/data/test.mtx
+ ${CMAKE_CURRENT_SOURCE_DIR}/Integration/data/test.tns
+ DESTINATION ${MLIR_INTEGRATION_TEST_DIR}/data/)
+endif()
+
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py