Skip to content

Commit 888cca0

Browse files
committed
[MLIR][Standalone] test Standalone against install distributions
1 parent 86c4f7f commit 888cca0

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

mlir/test/Examples/standalone/lit.local.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ config.substitutions.append(("%host_cc", config.host_cc))
1010
config.substitutions.append(("%enable_libcxx", config.enable_libcxx))
1111
config.substitutions.append(("%mlir_cmake_dir", config.mlir_cmake_dir))
1212
config.substitutions.append(("%llvm_use_linker", config.llvm_use_linker))
13+
config.substitutions.append(("%llvm_obj_root", config.llvm_obj_root))
14+
config.substitutions.append(("%host_cmake_install_prefix", config.host_cmake_install_prefix))
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# REQUIRES: github-actions
2+
# RUN: "%cmake_exe" --build %llvm_obj_root --target install
3+
# RUN: "%cmake_exe" "%mlir_src_root/examples/standalone" -G "%cmake_generator" \
4+
# RUN: -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc \
5+
# RUN: -DLLVM_ENABLE_LIBCXX=%enable_libcxx -DMLIR_DIR=%host_cmake_install_prefix \
6+
# RUN: -DLLVM_USE_LINKER=%llvm_use_linker \
7+
# RUN: -DPython3_EXECUTABLE=%python \
8+
# RUN: -DPython_EXECUTABLE=%python
9+
# RUN: "%cmake_exe" --build . --target check-standalone | tee %t
10+
# RUN: FileCheck --input-file=%t %s
11+
12+
# Note: The number of checked tests is not important. The command will fail
13+
# if any fail.
14+
# CHECK: Passed
15+
# CHECK-NOT: Failed
16+
# UNSUPPORTED: target={{.*(windows|android).*}}

mlir/test/lit.cfg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,6 @@ def have_host_jit_feature_support(feature_name):
383383

384384
if sys.version_info >= (3, 11):
385385
config.available_features.add("python-ge-311")
386+
387+
if "GITHUB_ACTIONS" in os.environ:
388+
config.available_features.add("github-actions")

mlir/test/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config.host_cxx = "@HOST_CXX@"
1818
config.enable_libcxx = "@LLVM_ENABLE_LIBCXX@"
1919
config.host_cmake = "@CMAKE_COMMAND@"
2020
config.host_cmake_generator = "@CMAKE_GENERATOR@"
21+
config.host_cmake_install_prefix = "@CMAKE_INSTALL_PREFIX@"
2122
config.llvm_use_linker = "@LLVM_USE_LINKER@"
2223
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
2324
config.host_arch = "@HOST_ARCH@"

0 commit comments

Comments
 (0)