[debuginfo-tests] commands.getoutput -> subprocess.check_output

We should also make Darwin Python3 happy after r346059
The output has an extra newline but it is fine in this particular case.

llvm-svn: 346066
This commit is contained in:
Fangrui Song 2018-11-03 04:52:32 +00:00
parent 3501895863
commit 93deae23d1
1 changed files with 2 additions and 2 deletions
debuginfo-tests

View File

@ -63,8 +63,8 @@ llvm_config.add_tool_substitutions(tools, tool_dirs)
lit.util.usePlatformSdkOnDarwin(config, lit_config)
if platform.system() == 'Darwin':
import commands
xcode_lldb_vers = commands.getoutput("xcrun lldb --version")
import subprocess
xcode_lldb_vers = subprocess.check_output(['xcrun', 'lldb', '--version'])
match = re.search('lldb-(\d+)', xcode_lldb_vers)
if match:
apple_lldb_vers = int(match.group(1))