<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/106636>106636</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[llvm-lit] Consolidate logic for enabling internal shell for all test suites
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
connieyzhu
</td>
</tr>
</table>
<pre>
As mentioned in [RFC: Enabling the Lit Internal Shell by Default](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179), we are in the process of turning on lit's internal shell across all LLVM test suites. We have been turning on the internal shell for each test suite one-by-one as we resolve bugs with the internal shell.
As of now, our strategy for doing so is to edit the lit configs for each test suite with the following lines:
```
use_lit_shell = True
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
if lit_shell_env:
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
```
**However, there should eventually be a way to enable the internal shell for the entire project without having to insert the above lines separately for each test suite.**
https://github.com/llvm/llvm-project/issues/102704 tracks the current status of being able to turn on the internal shell by default, and can serve as an indicator for when this issue can be addressed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklE2P2zYQhn8NfRlYkCl_HnRw1mskgJtDdtseDUoaWWy5nAVnZEf59QUpr7NuN6cCggRJxDPvfLxjmO3JI5Zq8UktdhPTS0ehrMl7i8OPrp9U1AzlluEFvVjy2ID1oBafvu0fVLGFR28qZ_0JpEM4WIEvXjB44-CpQ-egGmCHremdqMVO6XUn8sqq2Cq9V3rfWK6pD4yZc-eXjMJJ6b0ovQ9tPcUreiodTp2Vqb2ipxzR02qYNle03q_z2Wqj9EbpB7ggmIBRZxT1GqhGZqAWpA8-aiUPzorSK4Y3JiQmmDoQMxjn4HD44zcQZAHurSBn8CdCZ84IFaJ_z4pR_sVpKQCaunsHAPIYNZNH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