Enable ctest for iree/test/e2e/linalg_path; Prepare to enable further tests
Closes https://github.com/google/iree/pull/1246
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/iree/pull/1246 from iml130:iree-test 5f0767318c81f66cce01792a58cda3fd8618d8da
PiperOrigin-RevId: 302768916
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db5141c..db4d78f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,6 +179,7 @@
add_subdirectory(iree/modules)
add_subdirectory(iree/schemas)
add_subdirectory(iree/testing)
+add_subdirectory(iree/test)
if(${IREE_ENABLE_LLVM})
# The VM requires LLVM to build its op definitions.
diff --git a/iree/test/models/linalg_path/CMakeLists.txt b/iree/test/BUILD
similarity index 70%
copy from iree/test/models/linalg_path/CMakeLists.txt
copy to iree/test/BUILD
index 7df7d86..a98a3c4 100644
--- a/iree/test/models/linalg_path/CMakeLists.txt
+++ b/iree/test/BUILD
@@ -12,16 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-iree_add_all_subdirs()
-
-file(GLOB _GLOB_X_MLIR CONFIGURE_DEPENDS *.mlir)
-iree_lit_test_suite(
- NAME
- lit
- SRCS
- "${_GLOB_X_MLIR}"
- DATA
- iree::tools::IreeFileCheck
- iree::tools::iree-opt
- iree::tools::iree-run-mlir
+package(
+ default_visibility = ["//visibility:public"],
+ licenses = ["notice"], # Apache 2.0
)
diff --git a/iree/test/models/linalg_path/CMakeLists.txt b/iree/test/CMakeLists.txt
similarity index 73%
rename from iree/test/models/linalg_path/CMakeLists.txt
rename to iree/test/CMakeLists.txt
index 7df7d86..15e9263 100644
--- a/iree/test/models/linalg_path/CMakeLists.txt
+++ b/iree/test/CMakeLists.txt
@@ -13,15 +13,3 @@
# limitations under the License.
iree_add_all_subdirs()
-
-file(GLOB _GLOB_X_MLIR CONFIGURE_DEPENDS *.mlir)
-iree_lit_test_suite(
- NAME
- lit
- SRCS
- "${_GLOB_X_MLIR}"
- DATA
- iree::tools::IreeFileCheck
- iree::tools::iree-opt
- iree::tools::iree-run-mlir
-)
diff --git a/iree/test/models/linalg_path/CMakeLists.txt b/iree/test/e2e/BUILD
similarity index 70%
copy from iree/test/models/linalg_path/CMakeLists.txt
copy to iree/test/e2e/BUILD
index 7df7d86..a98a3c4 100644
--- a/iree/test/models/linalg_path/CMakeLists.txt
+++ b/iree/test/e2e/BUILD
@@ -12,16 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-iree_add_all_subdirs()
-
-file(GLOB _GLOB_X_MLIR CONFIGURE_DEPENDS *.mlir)
-iree_lit_test_suite(
- NAME
- lit
- SRCS
- "${_GLOB_X_MLIR}"
- DATA
- iree::tools::IreeFileCheck
- iree::tools::iree-opt
- iree::tools::iree-run-mlir
+package(
+ default_visibility = ["//visibility:public"],
+ licenses = ["notice"], # Apache 2.0
)
diff --git a/iree/test/models/linalg_path/CMakeLists.txt b/iree/test/e2e/CMakeLists.txt
similarity index 73%
copy from iree/test/models/linalg_path/CMakeLists.txt
copy to iree/test/e2e/CMakeLists.txt
index 7df7d86..15e9263 100644
--- a/iree/test/models/linalg_path/CMakeLists.txt
+++ b/iree/test/e2e/CMakeLists.txt
@@ -13,15 +13,3 @@
# limitations under the License.
iree_add_all_subdirs()
-
-file(GLOB _GLOB_X_MLIR CONFIGURE_DEPENDS *.mlir)
-iree_lit_test_suite(
- NAME
- lit
- SRCS
- "${_GLOB_X_MLIR}"
- DATA
- iree::tools::IreeFileCheck
- iree::tools::iree-opt
- iree::tools::iree-run-mlir
-)
diff --git a/iree/test/e2e/linalg_path/CMakeLists.txt b/iree/test/e2e/linalg_path/CMakeLists.txt
index 12e2462..7df7d86 100644
--- a/iree/test/e2e/linalg_path/CMakeLists.txt
+++ b/iree/test/e2e/linalg_path/CMakeLists.txt
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+iree_add_all_subdirs()
+
file(GLOB _GLOB_X_MLIR CONFIGURE_DEPENDS *.mlir)
iree_lit_test_suite(
NAME
diff --git a/iree/test/models/linalg_path/CMakeLists.txt b/iree/test/e2e/xla/CMakeLists.txt
similarity index 70%
copy from iree/test/models/linalg_path/CMakeLists.txt
copy to iree/test/e2e/xla/CMakeLists.txt
index 7df7d86..ba0a318 100644
--- a/iree/test/models/linalg_path/CMakeLists.txt
+++ b/iree/test/e2e/xla/CMakeLists.txt
@@ -12,16 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-iree_add_all_subdirs()
-
-file(GLOB _GLOB_X_MLIR CONFIGURE_DEPENDS *.mlir)
-iree_lit_test_suite(
- NAME
- lit
- SRCS
- "${_GLOB_X_MLIR}"
- DATA
- iree::tools::IreeFileCheck
- iree::tools::iree-opt
- iree::tools::iree-run-mlir
-)
+# bazel_to_cmake: DO NOT EDIT
diff --git a/iree/test/models/linalg_path/BUILD b/iree/test/models/linalg_path/BUILD
deleted file mode 100644
index e5f8e17..0000000
--- a/iree/test/models/linalg_path/BUILD
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Tests for common transforms.
-
-load("//iree:lit_test.bzl", "iree_lit_test_suite")
-
-package(
- default_visibility = ["//visibility:public"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_lit_test_suite(
- name = "lit",
- srcs = glob(
- ["*.mlir"],
- ),
- data = [
- "//iree/tools:IreeFileCheck",
- "//iree/tools:iree-opt",
- "//iree/tools:iree-run-mlir",
- ],
-)
diff --git a/iree/test/models/xla/BUILD b/iree/test/models/xla/BUILD
deleted file mode 100644
index f110356..0000000
--- a/iree/test/models/xla/BUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2019 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Tests for end-to-end IREE support starting from the XLA HLO dialect.
-
-load("//iree:lit_test.bzl", "iree_lit_test_suite")
-
-package(
- default_visibility = ["//visibility:public"],
- licenses = ["notice"], # Apache 2.0
-)
-
-iree_lit_test_suite(
- name = "lit",
- srcs = glob(["*.mlir"]),
- data = [
- "//iree/tools:IreeFileCheck",
- "//iree/tools:iree-run-mlir",
- ],
-)