[cfe-dev] message-length.c

Daniel Dunbar daniel at zuster.org
Sun Oct 25 13:29:23 PDT 2009


Hi John,

I think we should probably fix this issue in FileCheck somehow, but
for now I'll tweak the test to work around the issue.

 - Daniel

On Fri, Oct 23, 2009 at 9:32 AM, John Thompson
<john.thompson.jtsoftware at gmail.com> wrote:
> Daniel,
>
> I did some playing around with message-length.c, and I think the '\r''s are
> confusing FileCheck.  I think it's the regex function, which is seeing them,
> because the file is opened in binary mode.
> This seems to be the easy fix:
>
> Index: test/Misc/message-length.c
> ===================================================================
> --- test/Misc/message-length.c (revision 84858)
> +++ test/Misc/message-length.c (working copy)
> @@ -29,4 +29,4 @@
>
>
>  // CHECK: FILE:23:78
> -// CHECK: {{^  ...// some long comment text and a brace, eh {} $}}
> +// CHECK: {{^  ...// some long comment text and a brace, eh {} .$}}
> I tried to match things with '\r' in it, but couldn't get it to work.
> Alternatively, we could mess with FileCheck, but I was afraid to.  It uses
> the MemoryBuffer function to read the file, so it's hard to chang the open
> mode there.
>
> -John
>
> On Wed, Oct 21, 2009 at 12:58 PM, John Thompson
> <john.thompson.jtsoftware at gmail.com> wrote:
>>
>> Nudge (1 of 3)
>>
>> On Mon, Oct 19, 2009 at 8:56 AM, John Thompson
>> <john.thompson.jtsoftware at gmail.com> wrote:
>>>
>>> Daniel,
>>>
>>> After updating, I noticed this test newly failing on Windows:
>>>
>>> 1>********************
>>> 1>FAIL: Clang::Misc/message-length.c (728 of 1688)
>>> 1>******************** TEST 'Clang::Misc/message-length.c' FAILED
>>> ********************
>>> 1>Script:
>>> 1>--
>>> 1>C:/Tools/llvm/bin/Debug\clang.EXE -fsyntax-only -fmessage-length=72
>>> C:\Tools\llvm\tools\clang\test\Misc\message-length.c 2>&1 | FileCheck
>>> -strict-whitespace C:\Tools\llvm\tools\clang\test\Misc\message-length.c
>>> 1>C:/Tools/llvm/bin/Debug\clang.EXE -fsyntax-only -fmessage-length=1
>>> C:\Tools\llvm\tools\clang\test\Misc\message-length.c
>>> 1>--
>>> 1>Exit Code: 1
>>> 1>Command Output (stdout):
>>> 1>--
>>> 1>Command 0: "C:/Tools/llvm/bin/Debug\clang.EXE" "-fsyntax-only"
>>> "-fmessage-length=72" "C:\Tools\llvm\tools\clang\test\Misc\message-length.c"
>>> 1>Command 0 Result: 0
>>> 1>Command 0 Output:
>>> 1>Command 0 Stderr:
>>> 1>Command 1: "FileCheck" "-strict-whitespace"
>>> "C:\Tools\llvm\tools\clang\test\Misc\message-length.c"
>>> 1>Command 1 Result: 1
>>> 1>Command 1 Output:
>>> 1>Command 1 Stderr:
>>> 1>C:\Tools\llvm\tools\clang\test\Misc\message-length.c:32:67: error:
>>> expected string not found in input
>>> 1>// CHECK: {{^  ...// some long comment text and a brace, eh {} $}}
>>> 1>                                                                  ^
>>> 1><stdin>:18:11: note: scanning from here
>>> 1>FILE:23:78: warning: expected 'ON' or 'OFF' or 'DEFAULT' in pragma
>>> 1>          ^
>>> 1>--
>>> 1>Command Output (stderr):
>>> 1>--
>>> 1>--
>>>
>>> -John
>>>
>>> --
>>> John Thompson
>>> John.Thompson.JTSoftware at gmail.com
>>>
>>
>>
>>
>> --
>> John Thompson
>> John.Thompson.JTSoftware at gmail.com
>>
>
>
>
> --
> John Thompson
> John.Thompson.JTSoftware at gmail.com
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>




More information about the cfe-dev mailing list