Skip to content

[mlir][polly][llvm-lit] External shell unable to be turned on for lit tests #106459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
connieyzhu opened this issue Aug 28, 2024 · 1 comment · Fixed by #106458
Closed

[mlir][polly][llvm-lit] External shell unable to be turned on for lit tests #106459

connieyzhu opened this issue Aug 28, 2024 · 1 comment · Fixed by #106458

Comments

@connieyzhu
Copy link
Contributor

In both mlir and polly, tests are run with lit's internal shell by default. In order to use the external shell instead, the LIT_USE_INTERNAL_SHELL environment variable should be set to 0. The logic in the lit configs of these test suites prevents the external shell from being turned on.

Code:

use_lit_shell = True
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
if lit_shell_env:
	use_lit_shell = not lit.util.pythonize_bool(lit_shell_env)

config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)

The problem lies in the body of the if statement, with the use of not.

@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2024

@llvm/issue-subscribers-polly

Author: Connie Zhu (connieyzhu)

In both mlir and polly, tests are run with lit's internal shell by default. In order to use the external shell instead, the `LIT_USE_INTERNAL_SHELL` environment variable should be set to 0. The logic in the lit configs of these test suites prevents the external shell from being turned on.

Code:

use_lit_shell = True
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
if lit_shell_env:
	use_lit_shell = not lit.util.pythonize_bool(lit_shell_env)

config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)

The problem lies in the body of the if statement, with the use of not.

connieyzhu added a commit that referenced this issue Aug 30, 2024
…lit (#106458)

For both mlir and polly, the lit internal shell is the default shell for
running lit tests. However, if the user wanted to switch back to the
external shell by setting `LIT_USE_INTERNAL_SHELL=0`, the `not` used in
the body of the `if` conditional changes `use_lit_shell` to be True
instead of the intended False. Removing `not` allows for this lit config
to work as intended.

Fixes #106459.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants