[lld] r284645 - Avoid using grep command in a test.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 11:00:01 PDT 2016


Fixed in r284846. Thanks! I didn't know that such option existed.

On Fri, Oct 21, 2016 at 8:50 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> FileCheck has a -strict-whitespace option if you want.
>
> Cheers,
> Rafael
>
>
> On 19 October 2016 at 17:07, Rui Ueyama via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: ruiu
> > Date: Wed Oct 19 16:07:29 2016
> > New Revision: 284645
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=284645&view=rev
> > Log:
> > Avoid using grep command in a test.
> >
> > This test is failing on FreeBSD bots. This is an attempt to fix it
> > by not using grep command.
> >
> > Modified:
> >     lld/trunk/test/ELF/linkerscript/diagnostic.s
> >
> > Modified: lld/trunk/test/ELF/linkerscript/diagnostic.s
> > URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/
> linkerscript/diagnostic.s?rev=284645&r1=284644&r2=284645&view=diff
> > ============================================================
> ==================
> > --- lld/trunk/test/ELF/linkerscript/diagnostic.s (original)
> > +++ lld/trunk/test/ELF/linkerscript/diagnostic.s Wed Oct 19 16:07:29
> 2016
> > @@ -44,23 +44,24 @@
> >  # ERR5: line 6:
> >
> >  ## Check that text of lines and pointer to 'bad' token are working ok.
> > +## Because FileCheck ignores whitespace differences, we replace ' '
> with '.'.
> >  # RUN: echo "UNKNOWN_TAG {" > %t.script
> >  # RUN: echo ".text : { *(.text) }" >> %t.script
> >  # RUN: echo ".keep : { *(.keep) }" >> %t.script
> >  # RUN: echo ".temp : { *(.temp) } }" >> %t.script
> > -# RUN: not ld.lld -shared %t -o %t1 --script %t.script > %t.log 2>&1
> > -# RUN: FileCheck -check-prefix=ERR6 %s < %t.log
> > -# ERR6:      line 1:
> > -# ERR6-NEXT: UNKNOWN_TAG {
> > -# RUN: grep 'error: ^' %t.log
> > +# RUN: not ld.lld -shared %t -o %t1 --script %t.script 2>&1 | \
> > +# RUN:   sed 's/ /_/g' | FileCheck -check-prefix=ERR6 %s
> > +# ERR6:      error:_line_1:
> > +# ERR6-NEXT: error:_UNKNOWN_TAG_{
> > +# ERR6-NEXT: error:_^
> >
> >  ## One more check that text of lines and pointer to 'bad' token are
> working ok.
> >  # RUN: echo "SECTIONS {" > %t.script
> >  # RUN: echo ".text : { *(.text) }" >> %t.script
> >  # RUN: echo ".keep : { *(.keep) }" >> %t.script
> >  # RUN: echo "boom .temp : { *(.temp) } }" >> %t.script
> > -# RUN: not ld.lld -shared %t -o %t1 --script %t.script > %t.log 2>&1
> > -# RUN: FileCheck -check-prefix=ERR7 %s < %t.log
> > -# ERR7:      line 4: malformed number: .temp
> > -# ERR7-NEXT: boom .temp : { *(.temp) } }
> > -# RUN: grep 'error:      ^' %t.log
> > +# RUN: not ld.lld -shared %t -o %t1 --script %t.script 2>&1 | \
> > +# RUN:   sed 's/ /_/g' | FileCheck -check-prefix=ERR7 %s
> > +# ERR7:      error:_line_4:_malformed_number:_.temp
> > +# ERR7-NEXT: error:_boom_.temp_:_{_*(.temp)_}_}
> > +# ERR7-NEXT: error:______^
> >
> >
> > _______________________________________________
> > 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/20161021/d22eefdc/attachment.html>


More information about the llvm-commits mailing list