Author: cbieneman Date: Sun Oct 11 21:54:30 2015 New Revision: 250007 URL: http://llvm.org/viewvc/llvm-project?rev=250007&view=rev Log: [Darwin] Reworking r250003 to use lit.util.capture instead of subprocess.
Modified: libcxx/trunk/test/libcxx/test/config.py Modified: libcxx/trunk/test/libcxx/test/config.py URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=250007&r1=250006&r2=250007&view=diff ============================================================================== --- libcxx/trunk/test/libcxx/test/config.py (original) +++ libcxx/trunk/test/libcxx/test/config.py Sun Oct 11 21:54:30 2015 @@ -6,7 +6,6 @@ import pkgutil import re import shlex import sys -import subprocess import lit.Test # pylint: disable=import-error,no-name-in-module import lit.util # pylint: disable=import-error,no-name-in-module @@ -48,11 +47,8 @@ def getSysrootFlagsOnDarwin(config, lit_ # default system root path. if 'darwin' in config.target_triple: try: - cmd = subprocess.Popen(['xcrun', '--show-sdk-path'], - stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = cmd.communicate() - out = out.strip() - res = cmd.wait() + out = lit.util.capture(['xcrun', '--show-sdk-path']).strip() + res = 0 except OSError: res = -1 if res == 0 and out: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits