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

Aaron Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 15:24:46 PDT 2018


Really sorry about that. I committed that to fix some broke build bots with our patch and at the same time someone reverted my change, which means every bot will break. I’ve already recommitted the complete patch. Would you let me know if you still have problems locally?

Thanks,
Aaron

From: Eric Christopher <echristo at gmail.com>
Date: Monday, April 2, 2018 at 3:22 PM
To: Aaron Smith <aaron.smith at microsoft.com>
Cc: "llvm-commits at lists.llvm.org" <llvm-commits at lists.llvm.org>
Subject: Re: [llvm] r329020 - [lit] Use io.open to compare two files since it supports different encodings while older versions of open do not

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<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flab.llvm.org%3A8011%2Fbuilders%2Fclang-cmake-armv8-quick%2Fbuilds%2F1241&data=02%7C01%7Caaron.smith%40microsoft.com%7Ce370879489f44283de1108d598e8272f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636583045214799321&sdata=SriT%2F5Hy76lO5c5GQXoU8xmea1M2OMsRc9irxkO0tZM%3D&reserved=0>

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<mailto: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<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%3Frev%3D329020%26view%3Drev&data=02%7C01%7Caaron.smith%40microsoft.com%7Ce370879489f44283de1108d598e8272f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636583045214809325&sdata=oghSinMxmdk1cbu%2BRW9irp%2B%2B9gGRUrMb6LInJlw8%2Bf0%3D&reserved=0>
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<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fllvm.org%2Fviewvc%2Fllvm-project%2Fllvm%2Ftrunk%2Futils%2Flit%2Flit%2FTestRunner.py%3Frev%3D329020%26r1%3D329019%26r2%3D329020%26view%3Ddiff&data=02%7C01%7Caaron.smith%40microsoft.com%7Ce370879489f44283de1108d598e8272f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636583045214809325&sdata=xisvoMIrUqu1b2VBhZ6d5PCQZ15PtUnG29Nc3Haz5pE%3D&reserved=0>
==============================================================================
--- 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<mailto:llvm-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fllvm-commits&data=02%7C01%7Caaron.smith%40microsoft.com%7Ce370879489f44283de1108d598e8272f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636583045214809325&sdata=AUomhGyt0HN%2Bquk7Cf4eyhWM2eoqpHghXQYaNI2s53I%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/365e4089/attachment.html>


More information about the llvm-commits mailing list