[llvm] [Lit][NFC] Refactor shell environment functionality and in-process builtins from TestRunner.py into new modules (PR #176761)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 20 06:08:51 PST 2026


================
@@ -1,35 +1,23 @@
 from __future__ import absolute_import
-import errno
-import io
-import itertools
-import getopt
 import os, signal, subprocess, sys
 import re
-import stat
 import pathlib
-import platform
 import shlex
-import shutil
 import tempfile
 import threading
-import typing
 import traceback
 from typing import Optional, Tuple
-from io import StringIO
 
+from lit.InprocBuiltins import *
----------------
boomanaiden154 wrote:

I would rather we just imported `InprocBuiltins` from `lit` and then used `InprocBuiltins.<builtin name>` to access them rather than polluting the global namespace here (and below for `ShellEnvironment`).

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


More information about the llvm-commits mailing list