]> granicus.if.org Git - llvm/commitdiff
Change remaining references to lit.util.capture to use subprocess.check_output.
authorDavid L. Jones <dlj@google.com>
Thu, 6 Jul 2017 21:46:47 +0000 (21:46 +0000)
committerDavid L. Jones <dlj@google.com>
Thu, 6 Jul 2017 21:46:47 +0000 (21:46 +0000)
Summary:
The capture() function was removed in r306625. This should fix PGO breakages
reported by Michael Zolotukhin.

Reviewers: mzolotukhin

Subscribers: sanjoy, llvm-commits

Differential Revision: https://reviews.llvm.org/D35088

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307320 91177308-0d34-0410-b5e6-96231b3b80d8

test/Unit/lit.cfg
test/lit.cfg

index dac0bf829ba6ff3c632106cdc741a366afd7f851..9da82f5f2c9bd4910c9041741e9cf413cb0ae712 100644 (file)
@@ -3,6 +3,7 @@
 # Configuration file for the 'lit' test runner.
 
 import os
+import subprocess
 
 import lit.formats
 
@@ -75,8 +76,8 @@ if config.test_exec_root is None:
         lit_config.fatal('No site specific configuration available!')
 
     # Get the source and object roots.
-    llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
-    llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip()
+    llvm_src_root = subprocess.check_output(['llvm-config', '--src-root']).strip()
+    llvm_obj_root = subprocess.check_output(['llvm-config', '--obj-root']).strip()
 
     # Validate that we got a tree which points to here.
     this_src_root = os.path.join(os.path.dirname(__file__),'..','..')
index ed1ba2d11b1a9ec6b680d141ab83462b91f01e4d..8ed9187aea77c9a9911d3f59e00518259f99607b 100644 (file)
@@ -6,6 +6,7 @@ import os
 import sys
 import re
 import platform
+import subprocess
 
 import lit.util
 import lit.formats
@@ -150,8 +151,8 @@ if config.test_exec_root is None:
         lit_config.fatal('No site specific configuration available!')
 
     # Get the source and object roots.
-    llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
-    llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip()
+    llvm_src_root = subprocess.check_output(['llvm-config', '--src-root']).strip()
+    llvm_obj_root = subprocess.check_output(['llvm-config', '--obj-root']).strip()
 
     # Validate that we got a tree which points to here.
     this_src_root = os.path.dirname(config.test_source_root)