[all-commits] [llvm/llvm-project] 3f6cbd: [lit] Add LIT_CURRENT_TESTCASE environment variabl...

Andrew Haberlandt via All-commits all-commits at lists.llvm.org
Wed Nov 19 15:06:39 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f6cbdea4fecf11ffa4fa29151c69f53c7a59bf7
      https://github.com/llvm/llvm-project/commit/3f6cbdea4fecf11ffa4fa29151c69f53c7a59bf7
  Author: Andrew Haberlandt <ndrewh at users.noreply.github.com>
  Date:   2025-11-19 (Wed, 19 Nov 2025)

  Changed paths:
    M llvm/utils/lit/lit/TestRunner.py
    A llvm/utils/lit/tests/Inputs/shtest-env-positive/env-current-testcase.txt
    M llvm/utils/lit/tests/Inputs/shtest-env-positive/env-no-subcommand.txt
    M llvm/utils/lit/tests/shtest-env-positive.py

  Log Message:
  -----------
  [lit] Add LIT_CURRENT_TESTCASE environment variable when running tests (#168762)

I'm not aware of any way for `%run` wrapper scripts like
`iosssim_run.py`
([ref](https://github.com/llvm/llvm-project/blob/d2c7c6064259320def7a74e111079725958697d4/compiler-rt/test/sanitizer_common/ios_commands/iossim_run.py#L4))
to know what testcase they are currently running. This can be useful if
these wrappers need to create a (potentially remote) temporary directory
for each test case.

This adds the `LIT_CURRENT_TESTCASE` environment variable to both the
internal shell and the external shell, containing the full name of the
current test being run.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list