From 6bed14b3435c1c4d80bd1eae57d471175b08c45f Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 12 Oct 2015 02:54:30 +0000 Subject: [PATCH] [Darwin] Reworking r250003 to use lit.util.capture instead of subprocess. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250007 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/libcxx/test/config.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/libcxx/test/config.py b/test/libcxx/test/config.py index d71ab100..e0f2f5b4 100644 --- a/test/libcxx/test/config.py +++ b/test/libcxx/test/config.py @@ -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_config): # 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: