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

Angel Alvarez clist@REDACTED
Wed Dec 16 10:06:35 CET 2009


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

sinosuke@REDACTED:~/Tmp/kt> erl -noshell -eval "erlang:halt(0)" && echo Ok
Ok

sinosuke@REDACTED:~/Tmp/kt> erl -noshell -eval "erlang:halt(1)" && echo Ok


And using init:stop you allow apps to shutdown nicely...


sinosuke@REDACTED:~/Tmp/kt> erl -noshell -eval "init:stop(0)" && echo Ok
Ok

sinosuke@REDACTED:~/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.


More information about the erlang-questions mailing list