<div dir="ltr">Could be useful - as Paul mentioned, having it on standard output could be good - especially for buildbots (where rerunning the command is impractical). Though a more generalized solution for 'lit' where it dumps all the inputs and outputs (well, I guess, the textually representable ones - maybe that's basically just FileCheck) in a way that buildbot could split them out into separate files (easier to read, download/use, etc than one big stream), would be extra super awesome.<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 12, 2018 at 6:31 PM George Karpenkov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
FileCheck is a great tool for writing tests.<br>
However, it can be also a great tool for hiding the error cause from you, especially if a very common idiom<br>
<br>
RUN: ./myprog | FileCheck %s<br>
<br>
is used.<br>
If you need to know the output of “myprog” to figure out why your test is failing —  then well, good luck,<br>
you would need to manually copy’n paste that line, run it, and then note the output.<br>
(produced line “expected/got” are rarely enough to debug the problem)<br>
<br>
Would it be useful to have an optional, off-by-default mode for FileCheck, turned on by an environment variable,<br>
which would save all the input it gets, and then dump it on failure?<br>
I also wish we could get a <br>
<br>
The test case I imagine would be to run:<br>
<br>
ninja check-X<br>
<br>
note the failure,<br>
and then rerun:<br>
<br>
env FILECHECK_SUPER_VERBOSE=1 ninja check-X<br>
<br>
Thoughts?<br>
George<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>