[erlang-questions] Failing Makefile build on EUnit test failures

Jeremy Raymond <>
Wed Dec 16 13:05:08 CET 2009


Thanks Andrew, Angel. Using halt as suggested works like I need it to.


Jeremy

On Wed, Dec 16, 2009 at 4:06 AM, Angel Alvarez <> wrote:

> El Miércoles, 16 de Diciembre de 2009 02:06:35 Jeremy Raymond escribió:
> > Hello,
> >
> > I have a make file that runs my EUnit tests like this:
> >
> > eunit: ${EUNIT_OBJ}
> >     erl -noshell -pa ebin -eval 'eunit:test(${TEST_MODULES}, [verbose])'
> -s
> > init stop
> >
> > What I'd like to happen is have my build fail if any of the eunit tests
> fail
> > however even if tests fail the build suceeds (the command to run the
> tests
> > returns 0?). How can I make my build fail if the tests fail, and pass if
> the
> > tests pass?
> >
> >
> > Thanks,
> >
> > Jeremy
> >
>
> Also
>
> :~/Tmp/kt> erl -noshell -eval "erlang:halt(0)" && echo Ok
> Ok
>
> :~/Tmp/kt> erl -noshell -eval "erlang:halt(1)" && echo Ok
>
>
> And using init:stop you allow apps to shutdown nicely...
>
>
> :~/Tmp/kt> erl -noshell -eval "init:stop(0)" && echo Ok
> Ok
>
> :~/Tmp/kt> erl -noshell -eval "init:stop(1)" && echo Ok
>
>
> --
> No imprima este correo si no es necesario. El medio ambiente está en
> nuestras manos.
> __________________________________________
>
> Clist UAH a.k.a Angel
> __________________________________________
> Vivimos en un sociedad exquisitamente dependiente de la ciencia y la
> tecnología, cuando muy poco gente conoce algo de la ciencia ó de la
> tecnología.
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list