[PATCH] D154280: [LIT] Added an option to llvm-lit to emit the necessary test coverage data, divided per test case

Shivam Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 09:39:56 PDT 2023


xgupta added inline comments.


================
Comment at: llvm/utils/lit/lit/LitConfig.py:91
         self.echo_all_commands = echo_all_commands
+        self.per_test_coverage = per_test_coverage
 
----------------
delcypher wrote:
> Consider adding a `@property` getter and a setter (see `maxIndividualTestTime`) so that when setting the data it can be validated.
I added that but thinking about the use of that property as "echo_all_commands" don't have it. Can you please clarify?


================
Comment at: llvm/utils/lit/lit/TestRunner.py:1132
+            # Set the LLVM_PROFILE_FILE environment variable
+            llvm_profile_file = test_case_name + ".profraw"
+            env = test.config.environment
----------------
xgupta wrote:
> delcypher wrote:
> > How is this unique to every `RUN` line? A test case could have multiple run lines and I don't see how that would be handled here.
> I updated the documentation to say it is set for each test file.
Kept the documentation for each RUN and updated the code in that regard.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154280/new/

https://reviews.llvm.org/D154280



More information about the llvm-commits mailing list