<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Oct 31, 2012, at 11:17 , Matthieu Monrocq <<a href="mailto:matthieu.monrocq@gmail.com">matthieu.monrocq@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 4:28 PM, Edwin Vane <span dir="ltr"><<a href="mailto:edwin.vane@intel.com" target="_blank">edwin.vane@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi chandlerc,<br>
<br>
Following the example from loop-convert tests, simplifying the remove-cstr-calls lit script.<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D92" target="_blank">http://llvm-reviews.chandlerc.com/D92</a><br>
<br>
Files:<br>
test/remove-cstr-calls/basic.cpp<br>
<br>
Index: test/remove-cstr-calls/basic.cpp<br>
===================================================================<br>
--- test/remove-cstr-calls/basic.cpp<br>
+++ test/remove-cstr-calls/basic.cpp<br>
@@ -1,12 +1,7 @@<br>
-// RUN: rm -rf %t<br>
-// RUN: mkdir %t<br>
-// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\//g' > %t/compile_commands.json<br>
-// RUN: cp "%s" "%t/test.cpp"<br>
-// RUN: remove-cstr-calls "%t" "%t/test.cpp"<br>
-// RUN: cat "%t/test.cpp" | FileCheck %s<br>
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp<br>
+// RUN: remove-cstr-calls . %t.cpp --<br>
+// RUN: FileCheck -input-file=%t.cpp %s<br></blockquote><div><br>FileCheck can accept arguments on the standard input (and thus it's possible to pipe into it)<br><br>Would it be simpler to have remove-cstr-calls emit output on the standard output and just pipe it into FileCheck ?<br></div></div></blockquote><br></div><div>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.</div><div><br></div><div>Jordan</div><br></body></html>