diff options
author | Rui Ueyama <ruiu@google.com> | 2016-10-19 21:07:29 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-10-19 21:07:29 +0000 |
commit | 90d12f44b7cb0b072a1c2c49709ea371ab9d1a74 (patch) | |
tree | 3de7e0546398d0c3dcf741d0f477305cff5f2c6d | |
parent | 2271ba2c528478851a0ef8f0f4d7a2ed0af7bc43 (diff) | |
download | bcm5719-llvm-90d12f44b7cb0b072a1c2c49709ea371ab9d1a74.tar.gz bcm5719-llvm-90d12f44b7cb0b072a1c2c49709ea371ab9d1a74.zip |
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.
llvm-svn: 284645
-rw-r--r-- | lld/test/ELF/linkerscript/diagnostic.s | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lld/test/ELF/linkerscript/diagnostic.s b/lld/test/ELF/linkerscript/diagnostic.s index 23b7f9b432e..ebe002f3659 100644 --- a/lld/test/ELF/linkerscript/diagnostic.s +++ b/lld/test/ELF/linkerscript/diagnostic.s @@ -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:______^ |