summaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/lit.rst
diff options
context:
space:
mode:
authorShivam Gupta <Shivam.Gupta2@amd.com>2023-07-21 14:56:02 +0530
committerShivam Gupta <Shivam.Gupta2@amd.com>2023-07-21 15:23:01 +0530
commitd8e26bccb3016d255298b7db78fe8bf05dd880b2 (patch)
tree836e61d2c8a48be9a351791847c53262ad5c1155 /llvm/docs/CommandGuide/lit.rst
parent8fd207fd0dcc398c2fcfd953d7e3ebe7cb53f188 (diff)
[LIT] Added an option to llvm-lit to emit the necessary test coverage data, divided per test case
This patch is the first part of https://llvm.org/OpenProjects.html#llvm_patch_coverage. We have first define a new variable LLVM_TEST_COVERAGE which when set, pass --emit-coverage option to llvm-lit which will help in setting a unique value to LLVM_PROFILE_FILE for each RUN. So for example coverage data for test case llvm/test/Analysis/AliasSet/memtransfer.ll will be emitted as build/test/Analysis/AliasSet/memtransfer.profraw Reviewed By: hnrklssn Differential Revision: https://reviews.llvm.org/D154280
Diffstat (limited to 'llvm/docs/CommandGuide/lit.rst')
-rw-r--r--llvm/docs/CommandGuide/lit.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index 2f587c43585a..e82cfeb0695c 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -181,6 +181,12 @@ The timing data is stored in the `test_exec_root` in a file named
Run the tests in a random order, not failing/slowest first. Deprecated,
use :option:`--order` instead.
+.. option:: --per-test-coverage
+
+ Emit the necessary test coverage data, divided per test case (involves
+ setting a unique value to LLVM_PROFILE_FILE for each RUN). The coverage
+ data files will be emitted in the directory specified by `config.test_exec_root`.
+
.. option:: --max-failures N
Stop execution after the given number ``N`` of failures.