20

When running:

./rebar eunit

the tests are run also for the external dependencies. Is there a way to change this behaviour? Maybe through the rebar.config file?

Roberto Aloi
  • 30,570
  • 21
  • 75
  • 112

3 Answers3

33
./rebar eunit skip_deps=true

(or recursive=false with latest versions).

Alexey Romanov
  • 167,066
  • 35
  • 309
  • 487
  • Cool. It works. I've tried to set that in the rebar.config ({skip_deps, true}. and {eunit, [{skip_deps, true}]}.) with no luck, though. – Roberto Aloi Aug 10 '11 at 11:28
  • 4
    Note that `./rebar clean get-deps compile eunit skip_deps=true` doesn't work -- _why not_? Because `rebar` will skip *compile*-ing the dependencies, too! Separate commands `./rebar clean get-deps compile` and `./rebar eunit skip_deps=true` works, though. – Steve Powell Mar 01 '13 at 15:01
4

You also can also use

./rebar eunit apps=your_app1,your_app2

This will run eunit test only for the specified applications.

Richard Jonas
  • 390
  • 4
  • 8
3

There is also an option to run tests only for specific application:

./rebar eunit app=app_name
Ivan Dubrov
  • 4,778
  • 2
  • 29
  • 41