[Polly] [Tests] Update lit.cfg uses of lit.util.capture to subprocess.check_output

- `lit.util.capture` was removed in `r306625`.
- Replace `lit.util.capture` to `subprocess.check_output` as LLVM did.
- LLVM revision of this change: `https://reviews.llvm.org/D35088`.

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

llvm-svn: 307765
This commit is contained in:
Siddharth Bhat 2017-07-12 09:42:05 +00:00
parent 051bdb0b22
commit 87fa280831

View File

@ -3,6 +3,7 @@
import os import os
import platform import platform
import re import re
import subprocess
import lit.formats import lit.formats
import lit.util import lit.util
@ -80,8 +81,9 @@ if config.test_exec_root is None:
lit_config.fatal('No site specific configuration available!') lit_config.fatal('No site specific configuration available!')
# Get the source and object roots. # Get the source and object roots.
llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip() llvm_src_root = subprocess.check_output(['llvm-config', '--src-root']).decode("utf-8").strip()
llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip() llvm_obj_root = subprocess.check_output(['llvm-config', '--obj-root']).decode("utf-8").strip()
polly_src_root = os.path.join(llvm_src_root, "tools", "polly") polly_src_root = os.path.join(llvm_src_root, "tools", "polly")
polly_obj_root = os.path.join(llvm_obj_root, "tools", "polly") polly_obj_root = os.path.join(llvm_obj_root, "tools", "polly")