Rebar not detecting test suite

Adam Lindberg eproxus at gmail.com
Mon Jun 13 04:57:06 EDT 2011


That pull request makes sense. I cannot see a reason for not limiting the test runs to only modules which have corresponding source.

Cheers,
Adam


On Monday, June 13, 2011 at 10:50, Joseph Wayne Norton wrote:

> 
> Adam and others -
> 
> There is a pull request for this feature on GitHub.
> 
> https://github.com/basho/rebar/pull/45
> 
> Tuncer and I have *briefly* discussed this pull request and issue off the 
> mail list.
> 
> thanks,
> 
> 
> On Mon, 13 Jun 2011 17:41:21 +0900, Adam Lindberg <eproxus at gmail.com (mailto:eproxus at gmail.com)> 
> wrote:
> 
> > Wouldn't it make sense to run the tests in all modules in the test 
> > foder? That way an application that consists of a single module could 
> > still have a bunch of test suites that are run separately.
> > 
> > Cheers,
> > Adam
> > 
> > 
> > On Friday, June 10, 2011 at 18:51, David Reid wrote:
> > 
> > > I think the problem is that meck_proper is not a module.
> > > 
> > > From the eunit:test docs:
> > > 
> > > %% Example: ```eunit:test(fred)''' runs all tests in the module `fred'
> > > %% and also any tests in the module `fred_tests', if that module exists.
> > > 
> > > https://github.com/erlang/otp/blob/dev/lib/eunit/src/eunit.erl#L121
> > > 
> > > and rebar is calling eunit:test as eunit:test(Modules, EunitOpts).
> > > 
> > > https://github.com/basho/rebar/blob/master/src/rebar_eunit.erl#L177
> > > 
> > > Where Modules is built by looking in the .eunit directory and doing:
> > > 
> > >  BeamFiles = [N || N <- rebar_utils:beams(?EUNIT_DIR),
> > >  string:str(N, "_tests.beam") =:= 0],
> > >  Modules = [rebar_utils:beam_to_mod(?EUNIT_DIR, N) || N <- BeamFiles],
> > > 
> > > https://github.com/basho/rebar/blob/master/src/rebar_eunit.erl#L126
> > > 
> > > I think this is probably a bug in rebar and it should do something
> > > better. Probably actually passing A list of modules _including_
> > > things that end in _tests. Only using the modules less _tests modules
> > > for the operations where it is inappropriate.
> > > 
> > > -David
> > > 
> > > On Fri, Jun 10, 2011 at 2:25 AM, Adam Lindberg <eproxus at gmail.com (mailto:eproxus at gmail.com) 
> > > (mailto:eproxus at gmail.com)> wrote:
> > > > Hi,
> > > > 
> > > > Cloning git://github.com/eproxus/meck.git (http://github.com/eproxus/meck.git) 
> > > (http://github.com/eproxus/meck.git), adding a test suite called 
> > > meck_proper_tests.erl and running 'rebar eunit' results in rebar not 
> > > detecting the test suite. However renaming it to meck_proper_test.erl 
> > > (without the s) makes rebar pick it up.
> > > > 
> > > > I've created a branch with the test file added:
> > > > https://github.com/eproxus/meck/tree/rebar-test-detection
> > > > 
> > > > Why does this happen? meck_tests.erl is picked up just fine.
> > > > 
> > > > Cheers,
> > > > Adam
> > > > 
> > > > 
> > > > 
> > > > _______________________________________________
> > > > rebar mailing list
> > > > rebar at lists.basho.com (mailto:rebar at lists.basho.com)
> > > > http://lists.basho.com/mailman/listinfo/rebar_lists.basho.com
> > 
> > 
> > 
> > _______________________________________________
> > rebar mailing list
> > rebar at lists.basho.com (mailto:rebar at lists.basho.com)
> > http://lists.basho.com/mailman/listinfo/rebar_lists.basho.com
> 
> 
> -- 
> norton at alum.mit.edu (mailto:norton at alum.mit.edu)





More information about the rebar mailing list