Import the subprocess module once instead of doing it inline which is
error prone and leads to needless code duplication.
import platform
import shlex
import shutil
+import subprocess
import lit.formats
def find_sanitizer_runtime(name):
- import subprocess
resource_dir = subprocess.check_output(
[config.cmake_cxx_compiler,
'-print-resource-dir']).decode('utf-8').strip()
return copied_python
# Find the "real" python binary.
- import shutil, subprocess
real_python = subprocess.check_output([
config.python_executable,
os.path.join(os.path.dirname(os.path.realpath(__file__)),