[llvm] r329020 - [lit] Use io.open to compare two files since it supports different encodings while older versions of open do not

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 15:21:47 PDT 2018


I'm not sure which patch it is, but tons of bots are failing after these.

http://lab.llvm.org:8011/builders/clang-cmake-armv8-quick/builds/1241

as an example.

I'm also seeing it on my local linux box. Can you revert or fix please? :)

Thanks!

-eric

On Mon, Apr 2, 2018 at 2:47 PM Aaron Smith via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: asmith
> Date: Mon Apr  2 14:44:51 2018
> New Revision: 329020
>
> URL: http://llvm.org/viewvc/llvm-project?rev=329020&view=rev
> Log:
> [lit] Use io.open to compare two files since it supports different
> encodings while older versions of open do not
>
> Modified:
>     llvm/trunk/utils/lit/lit/TestRunner.py
>
> Modified: llvm/trunk/utils/lit/lit/TestRunner.py
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=329020&r1=329019&r2=329020&view=diff
>
> ==============================================================================
> --- llvm/trunk/utils/lit/lit/TestRunner.py (original)
> +++ llvm/trunk/utils/lit/lit/TestRunner.py Mon Apr  2 14:44:51 2018
> @@ -388,7 +388,7 @@ def executeBuiltinDiff(cmd, cmd_shenv):
>      def compareTwoFiles(filepaths):
>          filelines = []
>          for file in filepaths:
> -            with open(file, 'r') as f:
> +            with io.open(file, 'r') as f:
>                  filelines.append(f.readlines())
>
>          exitCode = 0
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/fea1f727/attachment.html>


More information about the llvm-commits mailing list