[cfe-dev] greping on Windows

John Thompson john.thompson.jtsoftware at gmail.com
Tue Sep 29 17:40:32 PDT 2009


Thanks for the pointer, Chris.

I've enclosed my attempt to convert address-space-field1.c to using
FileCheck.

It seems to work on both Windows and Linux x86 32-bit, though perhaps I
included too much of the output file in the checks.

If this is okay, shall I do it on the other failing tests?  Or should I ping
the individual test owners first?

-John

On Tue, Sep 29, 2009 at 4:49 PM, Chris Lattner <clattner at apple.com> wrote:

>
>  On Sep 29, 2009, at 4:45 PM, John Thompson wrote:
>
>  Switching to the gnuwin32 grep solved a bunch of the problems I had way
> back when with the test on Windows, but there still seem to be a few issues
> left.
>
> The first one I encounter in the tests is in address-space-field1.c.
>
> It uses something like:  "grep" "addrspace\(1\)" ...
>
> but either Windows or the gnuwin32 grep is choking on the '\''s
>
>
> Hi John,
>
> It would be best to convert this test to FileCheck.  Among other things it
> will be faster to run and more portable.
>
> -Chris
>
>
> The test passes if I change it to:
>
> // RUN: grep addrspace(1) %t | count 9 &&
> // RUN: grep addrspace(2) %t | count 9
>
> So, the question is, how to handle it?
>
> Could the python script be given smarts to convert it per platform>
>
> It seems that using preprocessor conditionals in the actual test file won't
> work.
>
> Or maybe some sort of conditional in the annoation language, i.e.:
>
> // RUNWIN32: ...
>
> or
>
> // IF WIN32 RUN: ...
>
> -John
>
> --
> 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
>
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090929/d7910a5e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addressspacefield1.patch
Type: application/octet-stream
Size: 2203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090929/d7910a5e/attachment.obj>


More information about the cfe-dev mailing list