[PATCH] D55443: [test] Capture stderr from 'tar --version' call as well

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 14 14:41:16 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL349204: [test] Capture stderr from 'tar --version' call as well (authored by mgorny, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D55443?vs=177265&id=178296#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55443/new/

https://reviews.llvm.org/D55443

Files:
  lld/trunk/test/lit.cfg.py


Index: lld/trunk/test/lit.cfg.py
===================================================================
--- lld/trunk/test/lit.cfg.py
+++ lld/trunk/test/lit.cfg.py
@@ -94,7 +94,10 @@
 tar_executable = lit.util.which('tar', config.environment['PATH'])
 if tar_executable:
     tar_version = subprocess.Popen(
-        [tar_executable, '--version'], stdout=subprocess.PIPE, env={'LANG': 'C'})
-    if 'GNU tar' in tar_version.stdout.read().decode():
+        [tar_executable, '--version'],
+        stdout=subprocess.PIPE,
+        stderr=subprocess.PIPE,
+        env={'LANG': 'C'})
+    sout, _ = tar_version.communicate()
+    if 'GNU tar' in sout.decode():
         config.available_features.add('gnutar')
-    tar_version.wait()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55443.178296.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181214/334d2e47/attachment.bin>


More information about the cfe-commits mailing list