Skip to content

[llvm-lit] Consolidate logic for enabling internal shell for all test suites #106636

@connieyzhu

Description

@connieyzhu

As mentioned in RFC: Enabling the Lit Internal Shell by Default, 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. This issue was brought up in this comment: #106458 (review).

#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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions