Before copying the .erl files to the .eunit directory ensure that they
are deleted if they already exist. This prevents EACCES errors to happen
when trying to re-copy .erl files that are read-only.
a) make_symlink throws "not supported" on OS < Vista (e.g. 2003)
b) tarball creation stores windows symlinks as absolute paths
instead of relative, causing service to fail to start after upgrade
is made permanent.
Avoid error reports like this one:
prompt$ rebar eunit
==> dummy (eunit)
Test passed.
=ERROR REPORT==== 29-Dec-2011::23:22:11 ===
** Generic server inet_gethost_native_sup terminating
** Last message in was {'EXIT',<0.62.0>,killed}
** When Server state == {state,inet_gethost_native,undefined,<0.62.0>,
{local,inet_gethost_native_sup}}
** Reason for termination ==
** killed
Previously, it could happen if an eunit test did something that
required a name lookup, like in this example:
-module(dummy_tests).
-include_lib("eunit/include/eunit.hrl").
x_test() ->
{ok, _Hostent} = inet:gethostbyname(localhost).
The inet_gethost_native is a process, started on demand, under a
supervisor_bridge under the kernel_sup, but it is not a gen_server
process or the like, so it has nothing in '$ancestors' in its process
dictionary to indicate it is part of kernel.
This patch allows users to specify the directory in which common_test
source files can be found. Most common_test suites are integration,
rather than unit tests and keeping the sources apart from test sources
for other frameworks such as eunit and PropEr is a useful feature.
It is now possible to call rebar as:
rebar xref skip_app=Mod1,Mod2,...
This makes it easy to skip running xref on (e.g)
imported dependencies in your application.
The function rebar_utils:is_skipped_app/0 is added so
that other rebar commands may use it.
Previously if erl_interface could not be found {error, not_found} was
incorrectly used as a path. With this change we fail early with a
descriptive error message.