forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch sets up a ninja target for testing llvm-cm, akin to the tool specific test targets in the monorepo. This allows for actually running the tests. Documentation has been added to the README.
- Loading branch information
1 parent
4ae7b82
commit 94c40d7
Showing
6 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
add_subdirectory(tools) | ||
|
||
configure_lit_site_cfg( | ||
"${CMAKE_CURRENT_SOURCE_DIR}/test/lit.site.cfg.in" | ||
"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg" | ||
) | ||
|
||
add_lit_testsuite(check-llvm-tools-llvm-cm "Running llvm-cm tests" | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
DEPENDS "llvm-cm" "yaml2obj" "not" "FileCheck" "count" "split-file" "llvm-mc" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
|
||
import lit.formats | ||
|
||
from lit.llvm import llvm_config | ||
|
||
config.name = "llvm-cm" | ||
config.test_format = lit.formats.ShTest(execute_external=False) | ||
|
||
config.suffixes = [".s", ".test"] | ||
|
||
config.test_source_root = os.path.dirname(__file__) | ||
config.test_exec_root = config.obj_root | ||
|
||
llvm_config.use_default_substitutions() | ||
config.substitutions.append(("yaml2obj", llvm_config.use_llvm_tool("yaml2obj"))) | ||
config.substitutions.append(("llvm-cm", llvm_config.use_llvm_tool("llvm-cm"))) | ||
config.substitutions.append(("split-file", llvm_config.use_llvm_tool("split-file"))) | ||
config.substitutions.append(("llvm-mc", llvm_config.use_llvm_tool("llvm-mc"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@LIT_SITE_CFG_IN_HEADER@ | ||
|
||
config.host_triple = "@LLVM_HOST_TRIPLE@" | ||
config.target_triple = "@LLVM_TARGET_TRIPLE@" | ||
config.src_root = "@LLVM_SOURCE_DIR@" | ||
config.obj_root = "@LLVM_BINARY_DIR@" | ||
config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@") | ||
|
||
import lit.llvm | ||
lit.llvm.initialize(lit_config, config) | ||
|
||
lit_config.load_config(config, "@LLVM_EXTERNAL_GEMATRIA_SOURCE_DIR@/llvm_cm/test/lit.cfg") |