Files
clang-p2996/llvm/utils/mlgo-utils/tests/lit.cfg
Aiden Grossman c71956d760 [MLGO] Add tests for scripts (#78878)
This patch adds integration tests for the script entry points. The tests
don't exercise all functionality, as that case is better covered by the
unit testing already checked in. This ensures that things like flag
parsing work and that the scripts are syntactically valid.
2024-01-21 14:49:45 -08:00

24 lines
799 B
INI

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))