-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Switch MLIR to use the internal LIT shell by default #65415
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,14 @@ | |
# name: The name of this test suite. | ||
config.name = "MLIR" | ||
|
||
config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell) | ||
# We prefer the lit internal shell which provides a better user experience on failures | ||
# unless the user explicitly disables it with LIT_USE_INTERNAL_SHELL=0 env var. | ||
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) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't honor the CMake config flag, but it'll respect the environment flag allowing to disable it if needed. Seems like the best I can do right now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What cmake config flag do you mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I misremembered, it is controlled by the env var always... Something to note is that we will still have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While I haven't tried, I believe you can just add/remove it in |
||
|
||
# suffixes: A list of file extensions to treat as test files. | ||
config.suffixes = [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it would be easier to put the
env
command inside the%{env}
substitution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hesitated, but it seemed that this was written so that %{env} can be redefined at will (even though no test is actually doing do at the moment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why these tests define and then redefine
%{env}
exactly once.Either way, it works, so it's up to MLIR people to decide how to organize this.