[erlang-bugs] R16 EUnit *** context setup failed ***

Diego Llarrull <>
Fri Feb 1 21:00:12 CET 2013


Hello everyone,

I'm working on a riak_core based project, that is, one which uses rebar 
+ GNU make and where the src files are located  in different folders 
than the beam files, which are inside inside zipped (.ez) files.

sync + libnotify will do the trick for unzipped files, but some extra 
trickery was needed to load the new .beam files

a) compile the modified sources
b) (create and) run a script that generates the .zip files containing 
the .beams and deploys those files in their destination directory
c) run the following code:

reload() ->
	Modules = [ X || {X,L} <- code:all_loaded(), is_list(L),string:str(L, 
?PATH_TO_CODE_DIR) =/= 0],
	lists:map(fun(X) -> c:l(X) end, Modules).

Hope this helps anyone, right now I'm trying out ssync to see if it is 
able to handle zipped files.

Best regards,

Diego

El jue 31 ene 2013 12:51:33 ART, Björn Gustavsson escribió:
> Thanks for bisecting!
>
> I will fix the bug in R16B.
>
>
> On Thu, Jan 31, 2013 at 1:11 AM, Tuncer Ayaz <
> <mailto:>> wrote:
>
>     On Fri, Nov 23, 2012 at 4:20 PM, Anthony Ramine wrote:
>     > I can reproduce this with the exact same steps.
>
>     This is the git-bisect result:
>
>     70b5e24c9498225fadc08d19503269c8aad851bf is the first bad commit
>     commit 70b5e24c9498225fadc08d19503269c8aad851bf
>     Author: Bjorn Gustavsson < <mailto:>>
>     Date:   Tue Sep 11 15:03:53 2012 +0200
>
>         Fix filelib:wildcard/2
>
>         filelib:wildcard("some/relative/path/*.beam", Path) would fail to
>         match any file. That is, filelib:wildcard/2 would not work if the
>         first component of the pattern did not contain any wildcard
>         characters.
>
>         Noticed-by: Samuel Rivas
>
>     > Le 13 nov. 2012 à 14:18, Tuncer Ayaz a écrit :
>     >
>     >> If I build and run rebar's EUnit tests with R16, I see "*** context
>     >> setup failed ***" errors.
>     >>
>     >> Interestingly, if I use a tree where ebin/*, rebar, and
>     .eunit/*.beam
>     >> have been built with R15B02, then neither R16 nor R15 throw the
>     >> context setup errors.
>     >>
>     >> # fetch and build rebar
>     >> $ git clone git://github.com/rebar/rebar.git
>     <http://github.com/rebar/rebar.git>
>     >> $ cd rebar
>     >> $ make
>     >> # run tests with new rebar binary
>     >> $ ./rebar eunit
>     >> # *** context setup failed *** errors and 50 out of 72 tests
>     >> # not executed
>     >> $ rm ebin/* .eunit/* rebar
>     >> # rebuild rebar and EUnit tests with R15
>     >> $ make && ./rebar eunit
>     >> # running EUnit tests with either R15 or R16 works now
>     >>
>     >> Can anyone else reproduce this? Could this be caused by compiler
>     >> changes in R16? I don't see any changes in lib/eunit after R15B02.
>
>
>
>
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB
>
>
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs




More information about the erlang-bugs mailing list