Stepan Dyatkovskiy
2012-May-24 07:44 UTC
[LLVMdev] make check-lit + grep escape characters
I just want to update test/Transforms/LowerSwitch/feature.ll that already uses grep. It uses grep + count, probably due to shorter construction. -Stepan. Eric Christopher wrote:> > On May 24, 2012, at 12:12 AM, Stepan Dyatkovskiy wrote: > >> Hi all. I found that if you want to use grep with escape characters in >> lit, you should pass it within the double slash (\\). Since the first >> one is captured by python scripts and the second one by grep. >> E.g. if you want to capture "grep icmp ule" you should pass >> "grep icmp\\ ule" >> >> So I'm going to commit the test with strings like this. How stable this >> feature in lit? > > Why are you using grep and not FileCheck? > > -eric
On May 24, 2012, at 12:44 AM, Stepan Dyatkovskiy wrote:> I just want to update test/Transforms/LowerSwitch/feature.ll that already uses grep. > It uses grep + count, probably due to shorter construction. >Might as well just update it to FileCheck while you're at it. -eric> Eric Christopher wrote: >> >> On May 24, 2012, at 12:12 AM, Stepan Dyatkovskiy wrote: >> >>> Hi all. I found that if you want to use grep with escape characters in >>> lit, you should pass it within the double slash (\\). Since the first >>> one is captured by python scripts and the second one by grep. >>> E.g. if you want to capture "grep icmp ule" you should pass >>> "grep icmp\\ ule" >>> >>> So I'm going to commit the test with strings like this. How stable this >>> feature in lit? >> >> Why are you using grep and not FileCheck? >> >> -eric >
On Thu, May 24, 2012 at 12:44 AM, Stepan Dyatkovskiy <stpworld at narod.ru>wrote:> I just want to update test/Transforms/LowerSwitch/feature.ll that > already uses grep. > It uses grep + count, probably due to shorter construction. >If you are touching such a test, please convert it to FileCheck. Use of 'grep' in tests is an endless source of problems, and we are lazily moving toward a world where only FileCheck is used.> > -Stepan. > > Eric Christopher wrote: > > > > On May 24, 2012, at 12:12 AM, Stepan Dyatkovskiy wrote: > > > >> Hi all. I found that if you want to use grep with escape characters in > >> lit, you should pass it within the double slash (\\). Since the first > >> one is captured by python scripts and the second one by grep. > >> E.g. if you want to capture "grep icmp ule" you should pass > >> "grep icmp\\ ule" > >> > >> So I'm going to commit the test with strings like this. How stable this > >> feature in lit? > > > > Why are you using grep and not FileCheck? > > > > -eric > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120524/4052087f/attachment.html>
Stepan Dyatkovskiy
2012-May-24 07:58 UTC
[LLVMdev] make check-lit + grep escape characters
OK. Chandler Carruth wrote:> On Thu, May 24, 2012 at 12:44 AM, Stepan Dyatkovskiy <stpworld at narod.ru > <mailto:stpworld at narod.ru>> wrote: > > I just want to update test/Transforms/LowerSwitch/feature.ll that > already uses grep. > It uses grep + count, probably due to shorter construction. > > > If you are touching such a test, please convert it to FileCheck. Use of > 'grep' in tests is an endless source of problems, and we are lazily > moving toward a world where only FileCheck is used. > > > -Stepan. > > Eric Christopher wrote: > > > > On May 24, 2012, at 12:12 AM, Stepan Dyatkovskiy wrote: > > > >> Hi all. I found that if you want to use grep with escape > characters in > >> lit, you should pass it within the double slash (\\). Since the > first > >> one is captured by python scripts and the second one by grep. > >> E.g. if you want to capture "grep icmp ule" you should pass > >> "grep icmp\\ ule" > >> > >> So I'm going to commit the test with strings like this. How > stable this > >> feature in lit? > > > > Why are you using grep and not FileCheck? > > > > -eric > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >