| 1 |
=============================== |
| 2 |
lit - A Software Testing Tool |
| 3 |
=============================== |
| 4 |
|
| 5 |
About |
| 6 |
===== |
| 7 |
|
| 8 |
*lit* is a portable tool for executing LLVM and Clang style test suites, |
| 9 |
summarizing their results, and providing indication of failures. *lit* is |
| 10 |
designed to be a lightweight testing tool with as simple a user interface as |
| 11 |
possible. |
| 12 |
|
| 13 |
|
| 14 |
Features |
| 15 |
======== |
| 16 |
|
| 17 |
* Portable! |
| 18 |
* Flexible test discovery. |
| 19 |
* Parallel test execution. |
| 20 |
* Support for multiple test formats and test suite designs. |
| 21 |
|
| 22 |
|
| 23 |
Documentation |
| 24 |
============= |
| 25 |
|
| 26 |
The official *lit* documentation is in the man page, available online at the LLVM |
| 27 |
Command Guide: http://llvm.org/cmds/lit.html. |
| 28 |
|
| 29 |
|
| 30 |
Source |
| 31 |
====== |
| 32 |
|
| 33 |
The *lit* source is available as part of LLVM, in the LLVM source repository: |
| 34 |
https://github.com/llvm/llvm-project/tree/main/llvm/utils/lit |
| 35 |
|
| 36 |
|
| 37 |
Contributing to lit |
| 38 |
=================== |
| 39 |
|
| 40 |
Please browse the issues labeled *tools:llvm-lit* in LLVM's issue tracker for |
| 41 |
ideas on what to work on: |
| 42 |
https://github.com/llvm/llvm-project/labels/tools%3Allvm-lit |
| 43 |
|
| 44 |
Before submitting patches, run the test suite to ensure nothing has regressed:: |
| 45 |
|
| 46 |
# From within your LLVM source directory. |
| 47 |
utils/lit/lit.py \ |
| 48 |
--path /path/to/your/llvm/build/bin \ |
| 49 |
utils/lit/tests |
| 50 |
|
| 51 |
Note that lit's tests depend on ``not`` and ``FileCheck``, LLVM utilities. |
| 52 |
You will need to have built LLVM tools in order to run lit's test suite |
| 53 |
successfully. |
| 54 |
|
| 55 |
You'll also want to confirm that lit continues to work when testing LLVM. |
| 56 |
Follow the instructions in http://llvm.org/docs/TestingGuide.html to run the |
| 57 |
regression test suite: |
| 58 |
|
| 59 |
make check-llvm |
| 60 |
|
| 61 |
And be sure to run the llvm-lit wrapper script as well: |
| 62 |
|
| 63 |
/path/to/your/llvm/build/bin/llvm-lit utils/lit/tests |
| 64 |
|
| 65 |
Finally, make sure lit works when installed via setuptools: |
| 66 |
|
| 67 |
python utils/lit/setup.py install |
| 68 |
lit --path /path/to/your/llvm/build/bin utils/lit/tests |
| 69 |
|