This commit is contained in:
2026-03-23 12:11:07 +01:00
commit e64eb40b38
4573 changed files with 3117439 additions and 0 deletions
@@ -0,0 +1,7 @@
<!--
Copyright © 2024 Rot127 <unisono@quyllur.org>
SPDX-License-Identifier: BSD-3
-->
lit configurations for MC regression test generation.
As an introduction see: https://medium.com/@mshockwave/using-llvm-lit-out-of-tree-5cddada85a78 ([archived](https://web.archive.org/web/20240421091240/https://medium.com/@mshockwave/using-llvm-lit-out-of-tree-5cddada85a78))
@@ -0,0 +1,14 @@
# Copyright © 2024 Rot127 <unisono@quyllur.org>
# SPDX-License-Identifier: BSD-3
from autosync.PathVarHandler import PathVarHandler
import lit.formats
config.name = "Generate Capstone MC regression tests"
config.test_format = lit.formats.ShTest(True)
config.suffixes = [".txt", ".s"]
config.excludes = ["Inputs", "CMakeLists.txt", "README.txt", "LICENSE.txt"]
config.test_source_root = PathVarHandler().get_path("{LLVM_LIT_TEST_DIR}")
@@ -0,0 +1,16 @@
# Copyright © 2024 Rot127 <unisono@quyllur.org>
# SPDX-License-Identifier: BSD-3
from autosync.Targets import TARGETS_LLVM_NAMING
from autosync.PathVarHandler import PathVarHandler
from pathlib import Path
import lit.llvm
lit.llvm.initialize(lit_config, config)
config.llvm_src_root = str(PathVarHandler().get_path("{LLVM_ROOT}").absolute())
config.root.targets = " ".join(TARGETS_LLVM_NAMING)
lit_cfg_dir = PathVarHandler().get_path("{LLVM_LIT_TEST_DIR}")
lit_config.load_config(config, lit_cfg_dir.joinpath("lit.cfg.py"))