Index: utils/libcxx/test/target_info.py =================================================================== --- utils/libcxx/test/target_info.py +++ utils/libcxx/test/target_info.py @@ -1,4 +1,4 @@ -#===----------------------------------------------------------------------===// +}#===----------------------------------------------------------------------===// # # The LLVM Compiler Infrastructure # @@ -8,11 +8,11 @@ #===----------------------------------------------------------------------===// import importlib -import lit.util # pylint: disable=import-error,no-name-in-module import locale import os import platform import re +import subprocess import sys class DefaultTargetInfo(object): @@ -73,12 +73,13 @@ super(DarwinLocalTI, self).__init__(full_config) def is_host_macosx(self): - name = lit.util.capture(['sw_vers', '-productName']).strip() + name = subprocess.check_output(['sw_vers', '-productName']).strip() return name == "Mac OS X" def get_macosx_version(self): assert self.is_host_macosx() - version = lit.util.capture(['sw_vers', '-productVersion']).strip() + version = subprocess.check_output( + ['sw_vers', '-productVersion']).strip() version = re.sub(r'([0-9]+\.[0-9]+)(\..*)?', r'\1', version) return version @@ -86,7 +87,7 @@ assert self.is_host_macosx() cmd = ['xcrun', '--sdk', name, '--show-sdk-path'] try: - out = lit.util.capture(cmd).strip() + out = subprocess.check_output(cmd).strip() except OSError: pass @@ -127,7 +128,7 @@ else: cmd = ['xcrun', '--show-sdk-path'] try: - out = lit.util.capture(cmd).strip() + out = subprocess.check_output(cmd).strip() res = 0 except OSError: res = -1