[racket] Can `raco test ...' return non 0 values?

From: Diogo F. S. Ramos (diogofsr at gmail.com)
Date: Wed Mar 20 15:25:36 EDT 2013

Jay McCarthy <jay.mccarthy at gmail.com> writes:

> On Wed, Mar 20, 2013 at 11:14 AM, Diogo F. S. Ramos <diogofsr at gmail.com> wrote:
>> All the tests should be checked, even if some fail, but if some fail,
>> there is a non-0 value returned.
>>
>> Is this possible?
>
> Implementing this change in rackunit would be difficult. Currently
> rackunit tests are modular and disconnected from one another. What you
> are imagine requires the "last one" (in this file? in this call to
> raco test?) to see if any of the others beforehand had a problem and
> exit with non-0 if they did.
>
> If you want to write a different program, then something like the
> existing rackunit/text-ui might be appropriate, where it gets a tree
> of non-modular tests and does some analysis on the result of
> everything. I personally find this form of rackunit usage to be a pain
> to deal with and prefer the modular approach.

Thank you. `rackunit/text-ui' looks interesting and I'll investigate it.

My backup plan is to write a filter that will wrap around `raco test
...'. It will then output everything `raco test ...' outputs but will
heuristically look for failures, like the word "FAILURE" or the phrase
"Check failure", returning non-0 values accordingly.

Posted on the users mailing list.