On Oct 31, 2012, at 11:17 , Matthieu Monrocq <matthieu.monr...@gmail.com> wrote:
> > > On Wed, Oct 31, 2012 at 4:28 PM, Edwin Vane <edwin.v...@intel.com> wrote: > Hi chandlerc, > > Following the example from loop-convert tests, simplifying the > remove-cstr-calls lit script. > > http://llvm-reviews.chandlerc.com/D92 > > Files: > test/remove-cstr-calls/basic.cpp > > Index: test/remove-cstr-calls/basic.cpp > =================================================================== > --- test/remove-cstr-calls/basic.cpp > +++ test/remove-cstr-calls/basic.cpp > @@ -1,12 +1,7 @@ > -// RUN: rm -rf %t > -// RUN: mkdir %t > -// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c > %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\//g' > > %t/compile_commands.json > -// RUN: cp "%s" "%t/test.cpp" > -// RUN: remove-cstr-calls "%t" "%t/test.cpp" > -// RUN: cat "%t/test.cpp" | FileCheck %s > +// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp > +// RUN: remove-cstr-calls . %t.cpp -- > +// RUN: FileCheck -input-file=%t.cpp %s > > FileCheck can accept arguments on the standard input (and thus it's possible > to pipe into it) > > Would it be simpler to have remove-cstr-calls emit output on the standard > output and just pipe it into FileCheck ? I have seen this done (and done it myself) but then you get the disadvantage of not checking the error code of remove-cstr-calls. We've hidden some crashes this way that occurred after all the checked lines have been printed. Jordan
_______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits