[llvm] [lit] Deprecate execute_external=True in ShTest (PR #201732)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 19:10:55 PDT 2026
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/201732
Implementing the deprecation part of
https://discourse.llvm.org/t/rfc-removal-of-the-lit-external-shell/90951.
I made this a hard error with an additional keyword argument to opt out of the warning behavior given we don't have the facilities to trivially log within ShTest like we do in the rest of lit, and I think forcing people to explicitly acknowledge that things are deprecated is not a bad thing.
>From dcc36f5147d2dc5426c66eb80e97312e9fae7fb0 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 5 Jun 2026 02:06:34 +0000
Subject: [PATCH] [lit] Deprecate execute_external=True in ShTest
Implementing the deprecation part of
https://discourse.llvm.org/t/rfc-removal-of-the-lit-external-shell/90951.
I made this a hard error with an additional keyword argument to opt out
of the warning behavior given we don't have the facilities to trivially
log within ShTest like we do in the rest of lit, and I think forcing
people to explicitly acknowledge that things are deprecated is not a bad
thing.
---
llvm/utils/lit/lit/formats/shtest.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/llvm/utils/lit/lit/formats/shtest.py b/llvm/utils/lit/lit/formats/shtest.py
index 5529b75f51d4f..a02c455106fb7 100644
--- a/llvm/utils/lit/lit/formats/shtest.py
+++ b/llvm/utils/lit/lit/formats/shtest.py
@@ -17,8 +17,19 @@ class ShTest(FileBasedTest):
"""
def __init__(
- self, execute_external=False, extra_substitutions=[], preamble_commands=[]
+ self,
+ execute_external=False,
+ extra_substitutions=[],
+ preamble_commands=[],
+ force_execute_external=False,
):
+ if not 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
More information about the llvm-commits
mailing list