[cfe-dev] greping on Windows

Chris Lattner clattner at apple.com
Tue Sep 29 16:49:19 PDT 2009


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090929/8cdcb052/attachment.html>


More information about the cfe-dev mailing list