[erlang-questions] Using EUnit from the shell

Richard Carlsson richardc@REDACTED
Wed Nov 1 13:12:14 CET 2006


Ben Butler-Cole wrote:
> I'm just starting to use EUnit. I'd like to integrate it with an
> automated build script (I'm using Rake).
> 
> So I need to find a way of running EUnit tests from the shell and
> having them return an error if the tests fail.
> 
> Has anyone come up with a way of doing this?
> 
> The best I've managed is
> 
> erl -noshell -run my_test test -run erlang halt
> 
> This prints out error messages if tests fail, but doesn't tell the
> shell that there has been a problem.
> 
> Any suggestions greatly appreciated.

Sorry that I haven't done anything to improve this yet. My intention
was to make a command line interface similar to that of edoc. I've
just been too %/&#¤ busy lately. Meanwhile, no, there is no simple
way of getting a success-or-failure flag back to the OS. A temporary
hack would be to detect errors using grep.

     /Richard




More information about the erlang-questions mailing list