lit (LLVM Integrated Tester) is a portable command-line tool for executing LLVM and Clang style test suites, summarizing their results, and providing indication of failures. It is designed to be lightweight and flexible, supporting parallel test execution and various test formats. The current version is 18.1.8 and is actively maintained as part of the LLVM project.
pip install litVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up a basic `lit` test suite. It involves creating a `lit.cfg.py` configuration file that `lit` uses to understand how to find and run tests, and a simple test file with `RUN` and `CHECK` directives. `lit` is then invoked from the command line against the test directory.
Focus on command-line invocation and Python configuration files (`lit.cfg.py`) for defining test behavior, rather than looking for a traditional Python API to import and call.
Ensure that your test directory hierarchy includes the necessary `lit.cfg.py` (or `lit.site.cfg.py`) files to define test suite parameters like `config.test_format` and `config.suffixes`.
Ensure that required LLVM tools (like `FileCheck` and `not`) are installed and accessible in your system's PATH, or specify their full paths using `config.substitutions` or directly in `config.test_format` (e.g., `not_tool='/usr/bin/not'`) within your `lit.cfg.py` file.
No dependency data recorded yet.