[Mlir-commits] [mlir] [polly] [mlir][polly][llvm-lit] Fixed logic for turning on external shell in lit (PR #106458)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 28 14:30:36 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Connie Zhu (connieyzhu)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/106458.diff
3 Files Affected:
- (modified) mlir/test/lit.cfg.py (+1-1)
- (modified) polly/test/UnitIsl/lit.cfg (+1-1)
- (modified) polly/test/lit.cfg (+1-1)
``````````diff
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index 98d0ddd9a2be11..930e4eb0aed68f 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -23,7 +23,7 @@
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)
+ use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
diff --git a/polly/test/UnitIsl/lit.cfg b/polly/test/UnitIsl/lit.cfg
index 0944d543572d86..d91edfbaf4f944 100644
--- a/polly/test/UnitIsl/lit.cfg
+++ b/polly/test/UnitIsl/lit.cfg
@@ -22,7 +22,7 @@ config.name = 'Polly - isl unit tests'
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)
+ use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
diff --git a/polly/test/lit.cfg b/polly/test/lit.cfg
index 156c1f97f5d3ae..c3f984b5c7f127 100644
--- a/polly/test/lit.cfg
+++ b/polly/test/lit.cfg
@@ -25,7 +25,7 @@ config.name = 'Polly'
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)
+ use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
``````````
</details>
https://github.com/llvm/llvm-project/pull/106458
More information about the Mlir-commits
mailing list