Skip to content

Commit edb1afd

Browse files
committed
join files
1 parent 090a2e6 commit edb1afd

File tree

6 files changed

+55
-31
lines changed

6 files changed

+55
-31
lines changed

mlir/examples/standalone/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ configure_lit_site_cfg(
1010
)
1111

1212
set(STANDALONE_TEST_DEPENDS
13-
FileCheck count not
13+
FileCheck
1414
standalone-capi-test
1515
standalone-opt
1616
standalone-translate

mlir/examples/standalone/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
tool_dirs = [config.standalone_tools_dir, config.llvm_tools_dir]
5555
tools = [
56-
"mlir-opt",
56+
ToolSubst("mlir-opt", pre=";", post=";", unresolved="fatal"),
5757
"standalone-capi-test",
5858
"standalone-opt",
5959
"standalone-translate",

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@ config.substitutions.append(("%host_cmake_install_prefix", config.host_cmake_ins
1616
config.substitutions.append(("%cmake_build_type", config.cmake_build_type))
1717
config.substitutions.append(("%cmake_c_compiler_launcher", config.cmake_c_compiler_launcher))
1818
config.substitutions.append(("%cmake_cxx_compiler_launcher", config.cmake_cxx_compiler_launcher))
19+
20+
# see https://github.com/llvm/llvm-project/blob/57782eff31e9d454b54a201c7ac43dc1b93dbb3f/llvm/utils/lit/lit/TestRunner.py#L1858
21+
config.substitutions.insert(0, ("FileCheck", "FileChuck"))
22+
config.substitutions.insert(0, ("count", "kount"))
23+
config.substitutions.insert(0, ("not", "mot"))
24+
config.substitutions.append(("kount", "count"))
25+
config.substitutions.append(("mot", "not"))
26+
config.substitutions.append(("FileChuck", "FileCheck"))
Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,54 @@
1-
# REQUIRES: github-actions
2-
# RUN: rm -rf %host_cmake_install_prefix
3-
# RUN: "%cmake_exe" --build "%llvm_obj_root" --target install
1+
# REQUIRESgithub-actions
2+
3+
# RUN: echo "test full install" | tee %t
4+
# CHECK: test full install
5+
6+
# RUN: rm -rf "%host_cmake_install_prefix"
7+
8+
# RUN: "%cmake_exe" --build "%llvm_obj_root" --target install -j | tee -a %t
9+
410
# RUN: "%cmake_exe" "%mlir_src_root/examples/standalone" -G "%cmake_generator" \
511
# RUN: -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc \
612
# RUN: -DCMAKE_CXX_COMPILER_LAUNCHER=%cmake_cxx_compiler_launcher -DCMAKE_C_COMPILER_LAUNCHER=%cmake_c_compiler_launcher \
7-
# RUN: -DLLVM_ENABLE_LIBCXX=%enable_libcxx -DMLIR_DIR="%host_cmake_install_prefix" \
13+
# RUN: -DLLVM_ENABLE_LIBCXX=%enable_libcxx \
14+
# RUN: -DLLVM_EXTERNAL_LIT="%llvm_obj_root/bin/llvm-lit" \
15+
# RUN: -DMLIR_DIR="%host_cmake_install_prefix/lib/cmake/mlir" \
16+
# RUN: -DLLVM_DIR="%host_cmake_install_prefix/lib/cmake/llvm" \
817
# RUN: -DLLVM_USE_LINKER=%llvm_use_linker \
918
# RUN: -DPython3_EXECUTABLE=%python \
10-
# RUN: -DPython_EXECUTABLE=%python
11-
# RUN: "%cmake_exe" --build . --target check-standalone | tee %t
19+
# RUN: -DPython_EXECUTABLE=%python | tee -a %t
20+
21+
# RUN: "%cmake_exe" --build . --target check-standalone -j | tee -a %t
22+
23+
# CHECK: Passed
24+
# CHECK-NOT: Failed
25+
# UNSUPPORTED: target={{.*(windows|android).*}}
26+
27+
# RUN: rm -rf "%host_cmake_install_prefix"
28+
29+
# RUN: echo "test install distribution" | tee -a %t
30+
# CHECK: test install distribution
31+
32+
# RUN: "%cmake_exe" "%llvm_src_root" -DCMAKE_BUILD_TYPE=%cmake_build_type -B "%llvm_obj_root" \
33+
# RUN: -DLLVM_DISTRIBUTION_COMPONENTS="llvm-headers;llvm-libraries;cmake-exports;FileCheck;count;not;mlir-headers;mlir-libraries;mlir-cmake-exports;mlir-tblgen;mlir-opt;mlir-python-sources" | tee -a %t
34+
35+
# RUN: "%cmake_exe" --build "%llvm_obj_root" --target install-distribution -j | tee -a %t
36+
37+
# RUN: "%cmake_exe" "%mlir_src_root/examples/standalone" -G "%cmake_generator" \
38+
# RUN: -DCMAKE_CXX_COMPILER=%host_cxx -DCMAKE_C_COMPILER=%host_cc \
39+
# RUN: -DCMAKE_CXX_COMPILER_LAUNCHER=%cmake_cxx_compiler_launcher -DCMAKE_C_COMPILER_LAUNCHER=%cmake_c_compiler_launcher \
40+
# RUN: -DLLVM_ENABLE_LIBCXX=%enable_libcxx \
41+
# RUN: -DLLVM_EXTERNAL_LIT="%llvm_obj_root/bin/llvm-lit" \
42+
# RUN: -DMLIR_DIR="%host_cmake_install_prefix/lib/cmake/mlir" \
43+
# RUN: -DLLVM_DIR="%host_cmake_install_prefix/lib/cmake/llvm" \
44+
# RUN: -DLLVM_USE_LINKER=%llvm_use_linker \
45+
# RUN: -DPython3_EXECUTABLE=%python \
46+
# RUN: -DPython_EXECUTABLE=%python | tee -a %t
47+
48+
# RUN: "%cmake_exe" --build . --target check-standalone -j | tee -a %t
49+
1250
# RUN: FileCheck --input-file=%t %s
1351

14-
# Note: The number of checked tests is not important. The command will fail
15-
# if any fail.
1652
# CHECK: Passed
1753
# CHECK-NOT: Failed
1854
# UNSUPPORTED: target={{.*(windows|android).*}}

mlir/test/Examples/standalone/test.install-distribution-dir.toy

Lines changed: 0 additions & 20 deletions
This file was deleted.

mlir/test/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def find_real_python_interpreter():
318318
]
319319
)
320320
else:
321-
tools.extend(["mlir-opt"])
321+
tools.extend([ToolSubst("mlir-opt", pre=";", post=";", unresolved="fatal")])
322322

323323
llvm_config.add_tool_substitutions(tools, tool_dirs)
324324

0 commit comments

Comments
 (0)