From b3bfd389c3fedf7005ce18a30e786b4c6cac8e33 Mon Sep 17 00:00:00 2001 From: "David L. Jones" Date: Thu, 6 Jul 2017 21:46:47 +0000 Subject: [PATCH] Change remaining references to lit.util.capture to use subprocess.check_output. 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/cfe/trunk@307320 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Unit/lit.cfg | 5 +++-- test/lit.cfg | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg index 39fad0099c..90eb2ac604 100644 --- a/test/Unit/lit.cfg +++ b/test/Unit/lit.cfg @@ -4,6 +4,7 @@ import os import platform +import subprocess import lit.formats import lit.util @@ -65,8 +66,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() clang_src_root = os.path.join(llvm_src_root, "tools", "clang") clang_obj_root = os.path.join(llvm_obj_root, "tools", "clang") diff --git a/test/lit.cfg b/test/lit.cfg index e72eca6bd3..2802657829 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -148,8 +148,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() clang_src_root = os.path.join(llvm_src_root, "tools", "clang") clang_obj_root = os.path.join(llvm_obj_root, "tools", "clang") -- 2.40.0