[PATCH] D99728: [lit, test] Fix test cancellation feature detection

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 02:26:34 PDT 2021


thopre added inline comments.


================
Comment at: llvm/utils/lit/tests/lit.cfg:83
+                      stderr=subprocess.PIPE, env=config.environment,
+                      universal_newlines=True)
+if proc.returncode == 0:
----------------
yln wrote:
> Please use `text=True` in favor of `universal_newlines=True`.
> 
> From the docs:
> > If encoding or errors are specified, or text is true, file objects for stdin, stdout and stderr are opened in text mode using the specified encoding and errors or the io.TextIOWrapper default. The universal_newlines argument is equivalent to text and is provided for backwards compatibility. By default, file objects are opened in binary mode.
> 
> We could also use `capture_output=True` instead of `stderr=subprocess.PIPE`.
Both of these require Python 3.7 and thus fail on Ubuntu 18.04 and RHEL


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99728



More information about the llvm-commits mailing list