Commit graph

934 commits

Author SHA1 Message Date
Tomas Abrahamsson
c8f56c7cb2 Don't kill any inet_gethost_native after eunit
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.
2011-12-29 23:38:03 +01:00
Tuncer Ayaz
3be021d31f Add Ali Sabil to THANKS file 2011-12-29 19:25:00 +01:00
Ali Sabil
f47d61bc13 Add {vsn, _} support for reltool.config 2011-12-28 13:18:40 +01:00
Tuncer Ayaz
1de48e4902 Move vcs_vsn/2 to rebar_utils 2011-12-28 13:09:46 +01:00
Tim Watson
286a2a88a4 Add support for customising common test directory
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.
2011-12-28 12:41:36 +01:00
Tuncer Ayaz
bd349bd2c4 bootstrap: do not ignore write_file return value 2011-12-25 16:46:13 +01:00
Matt Campbell
8c01734e98 bootstrap: generate windows scripts 2011-12-25 16:46:13 +01:00
Tuncer Ayaz
e4c427be21 Comment out vm args 2011-12-21 16:02:21 +01:00
Tuncer Ayaz
0bdda5baa1 Trim reltool config and add nodeid to release 2011-12-20 22:20:18 +01:00
Tuncer Ayaz
e4c85d4548 Remove trailing whitespace in rebar_reltool 2011-12-19 19:17:42 +01:00
Tuncer Ayaz
7c327c1195 Fix rebar_core crash (reported-by: Jeremy Raymond) 2011-12-18 13:29:58 +01:00
Tuncer Ayaz
58101588a1 Fix help text formatting 2011-12-16 21:04:18 +01:00
Tuncer Ayaz
8c89a388bf Universally support apps=/skip_apps= 2011-12-12 21:20:34 +01:00
Tuncer Ayaz
a5e39c2c54 Move is_skipped_app/0 to rebar_app_utils 2011-12-12 17:53:56 +01:00
Tuncer Ayaz
b1d84514f0 Add rebar_utils:deprecated/4 and remove define 2011-12-12 17:52:04 +01:00
Tuncer Ayaz
e33d3a568f rebar_xref: move code to proper place 2011-12-12 17:09:03 +01:00
Tuncer Ayaz
24254f7582 Add Torbjorn Tornkvist to THANKS file 2011-12-12 17:07:08 +01:00
Torbjorn Tornkvist
b4f136d752 Make 'rebar xref' honour the skip_app directive
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.
2011-12-12 17:06:23 +01:00
Tuncer Ayaz
e763ba28ed Add Jesse Gumm to THANKS file 2011-12-08 20:12:16 +01:00
Jesse Gumm
9f31ceae00 Fail if erl_interface not found
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.
2011-12-08 20:12:16 +01:00
Tuncer Ayaz
8f4e80b827 Update sample hooks config 2011-12-05 14:17:36 +01:00
Tuncer Ayaz
8de2c84d89 Add support for arch-specific hooks
{pre_hooks,  [{"linux", compile, "c_src/build_linux.sh"}]}.
{post_hooks, [{"linux", compile, "c_src/build_linux.sh clean"}]}.
2011-12-05 14:17:18 +01:00
Tuncer Ayaz
54259c5475 Document port_first_files 2011-11-30 19:50:24 +01:00
Tim Watson
0e3e94c253 Add support for first_files to port compiler
This patch adds support for first_files to the port_compiler, via the
new `port_first_files` rebar config element.
2011-11-30 19:39:23 +01:00
Tuncer Ayaz
d228e94137 Add root_dir= to shell completion 2011-11-26 12:09:39 +01:00
Tuncer Ayaz
a6fdac99a4 Fix and refactor reltool root_dir lookup 2011-11-26 12:01:13 +01:00
Tuncer Ayaz
ab79534507 Limit line length 2011-11-26 11:36:26 +01:00
Tuncer Ayaz
9632860ac2 Add Smith Winston to THANKS file 2011-11-26 10:38:56 +01:00
smithwinston
1eaf88d1d0 Add root_dir option to reltool.config
When generating a node using rebar generate, rebar always used
code:root_dir() to find the Erlang installation to clone into the node
tree.  However, for anyone wishing to build a cross-compiled node, there
was no way to override this.  This patch adds a new option to
reltool.config file to allow an alternate root_dir to be specified, for
example:

{root_dir, "/tmp/otp_R14B03_armv7l"}

This assumes that the contents of /tmp/otp_R14B03_armv7l has been
generated using the instructions found in the xcomp directory in your
$ERL_TOP structure.  NOTE: you may have to add additional filters to
exclude files not present in the xcomp version, such as the .smp files
if you have disabled that.
2011-11-26 10:38:27 +01:00
Bob Ippolito
a54dd53673 Treat HEAD as a branch to fix regressions caused by 3ef7db5 2011-11-16 21:46:18 +01:00
Tuncer Ayaz
147d5e3b56 Remove gratuitous space in debug log 2011-11-09 22:56:54 +01:00
Tuncer Ayaz
e62ea1994c Remove gratuitous prefix in error log 2011-11-08 16:04:27 +01:00
Tuncer Ayaz
d2cf35ad02 Remove obsolete comments (thanks Tim Watson) 2011-11-04 18:53:36 +01:00
Klas Johansson
896e8505b2 Stop applications before killing extra processes
This means that applications get a chance to shut down themselves,
before rebar will start killing their processes.  This avoids ERROR
REPORTS from application supervisors.
2011-11-02 20:08:24 +01:00
Jan Kloetzke
b10224be62 Fix rebar_utils:expand_env_variable/3
The function may fail with a badarg exception because the first regex
returns an iolist() which is allowed to be a improper list. In this case
'++' cannot append to the iolist. The correct way to append something to
an iolist() is

  [iolist(), "tail"]

because iolist's are allowed to be arbitrarily deep lists.
2011-11-01 22:00:15 +01:00
Tuncer Ayaz
9197e70bd7 Fix formatting 2011-10-26 23:23:46 +02:00
Tuncer Ayaz
c373f29292 Fix comments and formatting 2011-10-26 23:16:36 +02:00
Dave Smith
17616d1078 Overhaul environment expansion for better performance
The introduction of setup_env as a global concept caused the rebar_port_compiler
implementation to start getting called a LOT. The expansion of environment variables
that happens in the port compiler was O(n^n), which means you could see upwards of
80k invocations of lists:foldl on a single app "./rebar clean". This commit reworks
the expansion to be O(n^2), and reduces the running time for the same operation by
60%+. On a large project like Riak, the end result is that a build went from 200
seconds to 73.
2011-10-26 23:16:36 +02:00
Tuncer Ayaz
b65d5904f5 Fix deps_dir sample config 2011-10-26 17:11:03 +02:00
Dave Smith
1c1620a244 When profiling, save analysis results to disk 2011-10-25 23:58:53 -06:00
Dave Smith
45fc18f990 Add support for -p flag to profile rebar run 2011-10-25 13:33:40 -06:00
Tuncer Ayaz
28b9cebf0a Add -D support to rebar_port_compiler 2011-10-23 01:12:54 +02:00
Tuncer Ayaz
8eeca123e5 Cleanup and fix -D for erl_opts 2011-10-23 01:12:54 +02:00
Tuncer Ayaz
a0dcc624d9 Add -D option 2011-10-22 21:03:22 +02:00
Tuncer Ayaz
74ca540939 Use same variable names as file:make_link/2 2011-10-21 17:59:29 +02:00
Tuncer Ayaz
285ca0f6be Add overlay command to shell completion 2011-10-20 20:56:34 +02:00
Tuncer Ayaz
f8c698eb7f Update THANKS file 2011-10-20 20:29:16 +02:00
Przemysław Dąbek
eb23571b8b Add possibility to make symbolic links
Simple feature, useful to make link to something without copying it.
2011-10-20 20:29:16 +02:00
Fabian Linzberger
176ec0e71e Work around functions not found in source
For parameterized modules, the beam code will have a compiler
generated new/1 and instance/1 function.

If while checking the beam, xref detects one of those is unused, the
rebars xref wrapper will try to find the location of the definition of
that function in the source code for the module (to give a more
specific warning to the user). Since the function was generated by the
compiler it does not actually exist in the source, and rebar crashes
at that stage. This patch works around that issue.
2011-10-20 16:37:41 +02:00
Steven Gravell
3c7a5804e9 Add overlay command to run overlays only
required for building on a different machine to what your live
config is kept on. This way you can build on one machine,
distribute to new machine, then run overlays against a live
config to prevent accidently running code against a live
config in a development or ci environment.
2011-10-20 16:33:19 +02:00