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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 21:52:32 PDT 2018


Author: maskray
Date: Fri Nov  2 21:52:32 2018
New Revision: 346066

URL: http://llvm.org/viewvc/llvm-project?rev=346066&view=rev
Log:
[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.

Modified:
    debuginfo-tests/trunk/lit.cfg.py

Modified: debuginfo-tests/trunk/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/debuginfo-tests/trunk/lit.cfg.py?rev=346066&r1=346065&r2=346066&view=diff
==============================================================================
--- debuginfo-tests/trunk/lit.cfg.py (original)
+++ debuginfo-tests/trunk/lit.cfg.py Fri Nov  2 21:52:32 2018
@@ -63,8 +63,8 @@ llvm_config.add_tool_substitutions(tools
 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))




More information about the llvm-commits mailing list