[llvm-commits] [PATCH] A "very verbose" mode for FileCheck

Dmitri Gribenko gribozavr at gmail.com
Wed Jan 16 11:42:39 PST 2013


On Wed, Jan 16, 2013 at 9:34 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Wed, Jan 16, 2013 at 11:30 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>> On Wed, Jan 16, 2013 at 8:47 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>>> On Wed, Jan 16, 2013 at 8:42 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>>> On Wed, Jan 16, 2013 at 10:32 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
>>>>> Hello,
>>>>>
>>>>> When someone breaks a FileCheck-based test on some buildbot, sometimes
>>>>> it may not be obvious *why* did it fail.  If the failure can not be
>>>>> reproduced locally, it can be very hard to fix.
>>>>
>>>> Agreed.
>>>>
>>>>> I propose adding a "very verbose" mode to FileCheck.  In this mode
>>>>> FileCheck will dump the input file in case of failure.
>>>>
>>>> Why have a separate mode? The same problem of FileCheck failure
>>>> investigation exists even when developing locally - quite often after
>>>> a FileCheck failure the immediate next step is to run the command
>>>> without FileCheck just to get the output. Could we streamline this
>>>> scenario in general for both local and remote execution? (eg: have
>>>> FileCheck always dump a temp file & log the location)
>>>
>>> I agree that it is useful.  Will implement and post an updated version.
>>
>> Updated patch attached.  Now FileCheck prints:
>>
>> <all the usual messages>
>> Saving input file "<stdin>" to "/tmp/filecheck.txt-5PEf0q"
>> Input file "<stdin>" contains:
>> <...>
>
> Does this address my thought/desire that this should be the default
> behavior? (I assume people probably don't want the entire contents
> printed on each failure by default, so I guess the answer to my
> question is "no")

It saves to file by default, but prints to stderr only if envvar is set.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the llvm-commits mailing list