[Mlir-commits] [mlir] Switch MLIR to use the internal LIT shell by default (PR #65415)

Joel E. Denny llvmlistbot at llvm.org
Tue Sep 5 18:18:23 PDT 2023


================
@@ -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 provide a better user experience on failures
+# Unless the user explicitly disable 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)
----------------
jdenny-ornl wrote:

While I haven't tried, I believe you can just add/remove it in `config.available_features` in this `lit.cfg.py`... in case someone actually tries to use it one day in MLIR.  That's probably for MLIR people to decide.

https://github.com/llvm/llvm-project/pull/65415


More information about the Mlir-commits mailing list