go test ./... | fgrep -v '[no test files]'

that should be perfectly sufficient to you

On Friday, August 12, 2016 at 10:28:08 AM UTC+3, Simon Ritchie wrote:
>
> > go test ./...
>
> Sorry, I should have said, I already tried that.  The problem is, if you 
> have any directories that don't contain any tests, you get complaints.  For 
> each directory with no test files, you get a line on  stdout containing "?" 
> and "[no test files]".  This includes directories that just contain other 
> directories.  I could just ignore those complaint lines in the output, but 
> I prefer not to ignore complaint messages - it's easy to miss a similar 
> complaint that matters.
>
> So, I'm looking for something that only runs "go test" in directories that 
> contains tests.
>
> On Fri, Aug 12, 2016 at 7:28 AM, Dan Kortschak <[email protected] 
> <javascript:>> wrote:
>
>> go test ./...
>>
>> On Thu, 2016-08-11 at 23:22 -0700, Simon Ritchie wrote:
>> > Is there a simple tool that will search for and run all the tests in a 
>> Go project?
>> >
>> > What I'm looking for is a tool that will start at a given directory and 
>> descend recursively through any subdirectories, looking for test files and 
>> running them using go test.  Under UNIX you can do this using  find, but 
>> some people develop under Windoze.  You can do it using make, but then you 
>> have to maintain a make file.  The tool I describe would be 
>> self-maintaining.
>> >
>> > If such a tool does not exist, I plan to write one, but I thought I 
>> would ask first.
>> >
>> > Just to clarify, I'm not
>> > looking for some fancy all-singing-all-dancing test management 
>> framework.  I just want a simple way to run all my tests.
>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to