Discussions

Ask a Question
Back to All

Unexpected error caught in rebar_core when setting logdir

Hi,
I added this to my rebar.config as I only wanted the current run and I wanted them in the project root folder to make it easier to .gitignore and also make them visible to me:

{ct_opts,
 [{keep_logs, 1}
 ,{logdir, "./ct_logs"}]
}.

When I run with rebar3 ct I get this error,

===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump

and taking that advice I get a stack trace (at end) which seems to indicate that the "last" folder, a symlink, couldn't be found. If I "rm -fr" the _build folder the problem goes away for one build but then comes back, it's almost as though there is a hardcoded location still looking in the default location for that symlink.

Have I done something (probably) wrong in my configuration ?
Thanks,
Sean.

===

===> Uncaught error: {badmatch,{error,enoent}}
===> Stack trace to the error location:
[{rebar_prv_common_test,symlink_to_last_ct_logs,1,
                        [{file,"/home/sean/Documents/erlang/rebar3/src/rebar_prv_common_test.erl"},
                         {line,128}]},
 {rebar_prv_common_test,do,2,
                        [{file,"/home/sean/Documents/erlang/rebar3/src/rebar_prv_common_test.erl"},
                         {line,77}]},
 {rebar_core,do,2,
             [{file,"/home/sean/Documents/erlang/rebar3/src/rebar_core.erl"},
              {line,154}]},
 {rebar3,run_aux,2,
         [{file,"/home/sean/Documents/erlang/rebar3/src/rebar3.erl"},
          {line,181}]},
 {rebar3,main,1,
         [{file,"/home/sean/Documents/erlang/rebar3/src/rebar3.erl"},
          {line,66}]},
 {init,start_em,1,[]},
 {init,do_boot,3,[]}]