[PATCH] D34841: [lit/libcxx] Fix a remaining reference to lit.util.capture() in custom libcxx/Darwin code.
David L. Jones via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 16:05:28 PDT 2017
dlj updated this revision to Diff 104762.
dlj added a comment.
Typop
https://reviews.llvm.org/D34841
Files:
utils/libcxx/test/target_info.py
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,20 +73,21 @@
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
def get_sdk_version(self, name):
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34841.104762.patch
Type: text/x-patch
Size: 1936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/13e00056/attachment.bin>
More information about the llvm-commits
mailing list