Commit 5f5da46
committed
[lit] Add LIT_CURRENT_TESTCASE environment variable when running tests (llvm#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.
(cherry picked from commit 3f6cbde)1 parent 301e2d3 commit 5f5da46
File tree
4 files changed
+20
-4
lines changed- llvm/utils/lit
- lit
- tests
- Inputs/shtest-env-positive
4 files changed
+20
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
| 1127 | + | |
| 1128 | + | |
1127 | 1129 | | |
1128 | 1130 | | |
1129 | 1131 | | |
| |||
1323 | 1325 | | |
1324 | 1326 | | |
1325 | 1327 | | |
| 1328 | + | |
| 1329 | + | |
1326 | 1330 | | |
1327 | 1331 | | |
1328 | 1332 | | |
1329 | 1333 | | |
1330 | | - | |
| 1334 | + | |
1331 | 1335 | | |
1332 | 1336 | | |
1333 | 1337 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | | - | |
69 | | - | |
| 73 | + | |
| 74 | + | |
70 | 75 | | |
0 commit comments