llvm/llvm/utils/mlgo-utils/tests/lit.cfg

import os

import lit.formats

from lit.llvm import llvm_config

config.name = "mlgo-utils"
config.test_format = lit.formats.ShTest(execute_external=False)

config.suffixes = [".py", ".test"]

config.test_source_root = os.path.dirname(__file__)
config.test_exec_root = config.obj_root

config.environment["PYTHONPATH"] = os.path.join(config.src_root, "utils", "mlgo-utils")

llvm_config.use_default_substitutions()
config.substitutions.append(("split-file", llvm_config.use_llvm_tool("split-file")))
config.substitutions.append(("yaml2obj", llvm_config.use_llvm_tool("yaml2obj")))
config.substitutions.append(("llvm-objcopy", llvm_config.use_llvm_tool("llvm-objcopy")))

scripts_dir = os.path.join(config.src_root, "utils/mlgo-utils/mlgo")
config.substitutions.append(("%scripts_dir", scripts_dir))