[llvm-branch-commits] [llvm] 08493dd - Revert "[lit] Deprecate execute_external=True in ShTest (#201732)"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 11 08:51:22 PDT 2026
Author: Aiden Grossman
Date: 2026-06-11T08:51:18-07:00
New Revision: 08493dd44fc5075c0c11afd3111cf2518c15dcb7
URL: https://github.com/llvm/llvm-project/commit/08493dd44fc5075c0c11afd3111cf2518c15dcb7
DIFF: https://github.com/llvm/llvm-project/commit/08493dd44fc5075c0c11afd3111cf2518c15dcb7.diff
LOG: Revert "[lit] Deprecate execute_external=True in ShTest (#201732)"
This reverts commit 18cec023e10f4067b0e0bfa48c9a4209de6fd699.
Added:
Modified:
llvm/utils/lit/lit/formats/shtest.py
llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/lit.cfg
llvm/utils/lit/tests/Inputs/per-test-coverage/lit.cfg
llvm/utils/lit/tests/Inputs/shtest-external-shell-kill/lit.cfg
llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg
llvm/utils/lit/tests/Inputs/shtest-readfile/lit.cfg
llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg
llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit/formats/shtest.py b/llvm/utils/lit/lit/formats/shtest.py
index 80490c1f3227a..5529b75f51d4f 100644
--- a/llvm/utils/lit/lit/formats/shtest.py
+++ b/llvm/utils/lit/lit/formats/shtest.py
@@ -17,19 +17,8 @@ class ShTest(FileBasedTest):
"""
def __init__(
- self,
- execute_external=False,
- extra_substitutions=[],
- preamble_commands=[],
- force_execute_external=False,
+ self, execute_external=False, extra_substitutions=[], preamble_commands=[]
):
- if execute_external and not force_execute_external:
- raise ValueError(
- "execute_external=True is deprected as of LLVM-23 and the option will "
- "be removed in LLVM-24. Please move to using the internal shell "
- "(execute_external=False). If you still need to force external "
- "execution to allow time for migration, set force_execute_external=True"
- )
self.execute_external = execute_external
self.extra_substitutions = extra_substitutions
self.preamble_commands = preamble_commands
diff --git a/llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/lit.cfg b/llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/lit.cfg
index 7487b09a228a2..b83d61eec595b 100644
--- a/llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/per-test-coverage-by-lit-cfg/lit.cfg
@@ -3,11 +3,9 @@ import os
config.name = "per-test-coverage-by-lit-cfg"
config.suffixes = [".py"]
-use_external_shell = eval(lit_config.params.get("execute_external"))
config.test_format = lit.formats.ShTest(
- execute_external=use_external_shell,
- preamble_commands=["%{python} %s | FileCheck -DINDEX=0 %s"],
- force_execute_external=use_external_shell
+ execute_external=eval(lit_config.params.get("execute_external")),
+ preamble_commands=["%{python} %s | FileCheck -DINDEX=0 %s"]
)
lit_config.per_test_coverage = True
config.substitutions.append(("%{python}", '"%s"' % (sys.executable)))
diff --git a/llvm/utils/lit/tests/Inputs/per-test-coverage/lit.cfg b/llvm/utils/lit/tests/Inputs/per-test-coverage/lit.cfg
index 19d77b80e64f1..9ffca93def73f 100644
--- a/llvm/utils/lit/tests/Inputs/per-test-coverage/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/per-test-coverage/lit.cfg
@@ -3,10 +3,8 @@ import os
config.name = "per-test-coverage"
config.suffixes = [".py"]
-use_external_shell = eval(lit_config.params.get("execute_external"))
config.test_format = lit.formats.ShTest(
- execute_external=use_external_shell,
- preamble_commands=["%{python} %s | FileCheck -DINDEX=0 %s"],
- force_execute_external=use_external_shell
+ execute_external=eval(lit_config.params.get("execute_external")),
+ preamble_commands=["%{python} %s | FileCheck -DINDEX=0 %s"]
)
config.substitutions.append(("%{python}", '"%s"' % (sys.executable)))
diff --git a/llvm/utils/lit/tests/Inputs/shtest-external-shell-kill/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-external-shell-kill/lit.cfg
index 1f9ccb7d08091..d10594dc525f5 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-external-shell-kill/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-external-shell-kill/lit.cfg
@@ -1,6 +1,5 @@
import lit.formats
-config.test_format = lit.formats.ShTest(execute_external=True,
- force_execute_external=True)
+config.test_format = lit.formats.ShTest(execute_external=True)
config.name = "shtest-external-shell-kill"
config.suffixes = [".txt"]
diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg
index 20c399010ed7d..4cc234df4fcaa 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/lit.local.cfg
@@ -1,4 +1,3 @@
import lit.formats
-config.test_format = lit.formats.ShTest(execute_external=True,
- force_execute_external=True)
+config.test_format = lit.formats.ShTest(execute_external=True)
diff --git a/llvm/utils/lit/tests/Inputs/shtest-readfile/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-readfile/lit.cfg
index e044a1a15d212..80af27f57d35c 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-readfile/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-readfile/lit.cfg
@@ -7,8 +7,7 @@ config.name = "shtest-readfile"
config.suffixes = [".txt"]
lit_shell_env = os.environ.get("LIT_USE_INTERNAL_SHELL")
use_lit_shell = lit.util.pythonize_bool(lit_shell_env)
-config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell,
- force_execute_external=not use_lit_shell)
+config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
config.test_source_root = None
config.test_exec_root = None
config.substitutions.append(("%{python}", '"%s"' % (sys.executable)))
diff --git a/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg
index 81a13c69649d6..913495fbb3fe3 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/lit.local.cfg
@@ -1,7 +1,6 @@
import lit.formats
-config.test_format = lit.formats.ShTest(execute_external=True,
- force_execute_external=True)
+config.test_format = lit.formats.ShTest(execute_external=True)
config.substitutions.append(("%{cmds-with-newlines}", """
echo abc |
FileCheck %s &&
diff --git a/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg b/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg
index 3e2dc3a130e72..3a72f35024eb2 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg
@@ -21,8 +21,7 @@ if configSetTimeout != "0":
# Try setting the max individual test time in the configuration
config.maxIndividualTestTime = int(configSetTimeout)
-config.test_format = lit.formats.ShTest(execute_external=externalShell,
- force_execute_external=externalShell)
+config.test_format = lit.formats.ShTest(execute_external=externalShell)
config.suffixes = [".py"]
config.test_source_root = os.path.dirname(__file__)
More information about the llvm-branch-commits
mailing list