[erlang-questions] Testing with EUnit

Sam Tregar <>
Sun Apr 29 20:39:50 CEST 2007


Hello all.  I'm new to Erlang, just trying to figure out how best to
work in a new environment.  I've been writing tests with EUnit but I'm
having trouble finding a simple way to run the tests with a single
command.  Right now I've got a Makefile that says (where geocode.erl
is the module I'm testing, which uses EUnit):

    test: compile
 	 ${ERL} -s geocode test

So then when I want to run the tests I do:

    $ make test

This runs the test suite, giving me:

   Eshell V5.5.2  (abort with ^G)
   1>   Test successful.
   1>

Now I'm at an Eshell prompt and if I want to run the test suite again
I have to exit the shell before I can 'make test' again.  This is less
than ideal.

So my question is, how do I setup my environment so I can run 'make
test' and have the process exit when the tests are done?

Thanks,
-sam



More information about the erlang-questions mailing list