Commit graph

74 commits

Author SHA1 Message Date
Tuncer Ayaz
39ab4e13fb Generate cachegrind file if erlgrind is available 2014-12-08 23:09:20 +01:00
Fred Hebert
d6f4fd1c28 Merge pull request #338 from vladdu/app_src_script
Processing .app.src.script expects a single value to be returned.
2014-12-04 10:26:26 -05:00
Vlad Dumitrescu
d17b254662 add tests for processing .app.src{.script} files 2014-12-03 18:39:29 +01:00
Vlad Dumitrescu
aa5b8ac772 add Emacs/vi header to non-dummy test modules 2014-12-02 10:52:45 +01:00
Tristan Sloughter
47dba1bbc3 Merge pull request #399 from tomas-abrahamsson/gpb-inttest-timeout
Increase the timeout for the inttest/proto_gpb
2014-12-01 20:14:23 -06:00
Tomas Abrahamsson
f1ef90b9df Increase the timeout for the inttest/proto_gpb
On my slow old netbook with a 1.6GHz CPU, this inttest
takes about 40 seconds to run, of which network activity
is about 3s, the default timeout of retest is 30s.
Add a generous margin to avoid unnecessary timeouts.
2014-12-01 23:47:45 +01:00
Fred Hebert
d42ed46835 Normalize log level as WARN to ERROR in new patch 2014-11-27 15:34:52 -05:00
Tuncer Ayaz
a4c5f3357f Treat vsn mismatch as warning if -k/--keep-going
Fixes #319.
2014-11-25 18:44:21 +01:00
Fred Hebert
4ba8f74787 Revert "Merge branch 'platinumthinker-color_in_logs'"
This reverts commit 49930fe566, reversing
changes made to 6e6b0fd43f.
2014-11-21 09:57:49 -05:00
Fred Hebert
733d3771fa Merge branch 'color_in_logs' of https://github.com/platinumthinker/rebar into platinumthinker-color_in_logs
Conflicts:
	THANKS
2014-11-21 09:46:10 -05:00
Andrey Teplyashin
c01cf5902b Add colored logs 2014-11-19 23:44:55 +06:00
Fred Hebert
17e0b14d1d Merge pull request #203 from tomas-abrahamsson/pluggable-proto-compilers-gpb
Pluggable proto compilers gpb
2014-10-31 09:32:13 -04:00
Tomas Abrahamsson
9f057f29c5 Add inttest for default proto compiler (protobuffs)
This borrows heavily from the inttest for gpb, many thanks
to Luis Rascão for providing a most useful example.
2014-10-29 23:46:01 +01:00
Luis Rascão
144cb8c156 Add proto compiler gpb inttest
exercises rebar/gpb integration

The bulk of these tests are written by Luis Rascão, hence he is the
author of this commit. As the committer, I have cherry-picked his two
commits 4c87bcd and ebb8182, from the feature/support_gpb_protobuf
branch in the git://github.com/lrascao/rebar repo, and have slightly
adapted it to fit this pluggable-proto-compilers-gpb branch.

Update the THANKS file
2014-10-29 23:46:01 +01:00
Tuncer Ayaz
631d74c00f Implement eflame -p/--profile support
When -p/--profile is enabled, you can select the profiler as follows:

generate flame graph (eflame.svg) from trace (eflame.trace)
$ rebar -p compile profiler=eflame

generate fprof.analysis
$ rebar -p compile

generate fprof.analysis
$ rebar -p compile profiler=fprof
2014-10-29 19:24:58 +01:00
Tuncer Ayaz
009b50ec3b inttest/logging: fix log level 2014-10-29 19:11:10 +01:00
Tuncer Ayaz
173f5b82d6 inttest: add missing headers and fix a typo 2014-10-29 19:11:10 +01:00
Tuncer Ayaz
c2afc7d98b Minor follow-up fixes for #293 2014-09-11 19:06:04 +02:00
Fred Hebert
d5e3b4329c Merge pull request #293 from liskin/port-deps
Check C source dependencies in needs_compile
2014-09-11 09:53:30 -07:00
Tuncer Ayaz
3fb4a7c540 Fix OS X resource fork handling (Reported-by: Richard O'Keefe)
If you happen to fetch a zip archive of the git repo and try to build
from that, you may, for example, ask erlc to build src/._rebar.erl.
._* are OS X resource forks and not real .erl files. This may also
happen with network filesystems on OS X. To fix that, limit the
files compiled by rebar to include only those which start with
a letter or a digit.
2014-07-25 20:52:30 +02:00
Fred Hebert
dcfa6daf30 Merge branch 'erl-args-to-end' of https://github.com/NineFX/rebar into NineFX-erl-args-to-end
Conflicts:
	THANKS
2014-07-15 08:20:29 -04:00
varnerac-ubnt
35ee457176 Fix bug 271
Moves ct_extra_params to the end of the generated ct_run command.
This allows users to pass commands to the underlying emulator
using -erl_args. The included rt test demonstrates that it is
possible to pass an addtional option to ct_run and -erl_args at
the same time. Finally, the test executes in regular and verbose
modes because rebar constructs the ct_run command differently in
verbose mode.
2014-06-27 15:35:56 -05:00
Tomas Janousek
da10a0578c Add test for C dependencies 2014-06-15 17:22:26 +02:00
Slava Yurin
49c25642b3 Fix #249 (erlc regression)
The combination of changes to rebar_erlc_compiler, and the fact
that erl_first_files is inherited, caused a regression. To fix
that, ensure every project uses its own .rebar/erlcinfo. While at
it, fix the issue that erl_first_files entries were not included
when initializing the dep digraph.

Reported-by: Louis-Philippe Gauthier
Reported-by: Roland Karlsson

Thanks: Tuncer Ayaz
2014-05-30 18:55:09 +07:00
Slava Yurin
23c63f7003 Regression test for #249 2014-05-30 18:24:57 +07:00
Jared Morrow
93621d0d0c Merge pull request #251 from mururu/eunit_compile_opts
Make sure that eunit/qc_compile_opts works
2014-05-19 09:14:03 -06:00
Jared Morrow
fdb66ecb94 Merge pull request #242 from tuncer/erlc-speedup-v5-fixup
Extra commits for #129
2014-05-19 09:06:20 -06:00
Yuki Ito
c996e9878b Make sure that eunit/qc_compile_opts works fix #245 2014-05-13 12:53:52 +09:00
Tuncer Ayaz
99fe270e59 Fix #267 (code path regression)
Since the introduction of -r/--recursive, deps were not properly added
to the code path when running ct, eunit, etc.

To fix that, pass a flag down to process_dir1 and conditionalize
execution of the command. This moves the decision into process_dir1
where we can decide to invoke preprocess/2 and postprocess/2 but not
execute the command.

Without this fix, you'd have to, for example, invoke 'rebar -r ct
skip_deps=true', if you wanted to run base_dir's ct suites with deps on
the code path (while skipping all non-base_dir ct suites).

So, with this patch applied, if you run
$ rebar ct
deps will be on the code path, and only base_dir's ct suites will be
tested.

If you want to test ct suites in base_dir and sub_dirs, you have to run
$ rebar -r ct skip_deps=true

If you want to test ct suites in all dirs, you have to run
$ rebar -r ct

The fix is not specific to ct and applies to all commands.

To be able to add inttest/code_path_no_recurse/deps, I had to fix
.gitignore. While at it, I've updated and fixed all entries.
2014-04-23 22:17:23 +02:00
Tuncer Ayaz
b2dfebab15 erlc: add test suite 2014-03-12 20:45:37 +01:00
Jared Morrow
415d872730 Keep compile recursive and update the tests to not pass -r to compile 2014-03-11 21:24:19 +00:00
Tuncer Ayaz
77a0eb6fe4 Fix #56 (always-on recursion)
Always-on recursive application of all rebar commands causes too many
issues. Recursive application is required for:
1. dealing with dependencies: get-deps, update-deps, and compile of deps
   right after get-deps or update-deps
2. projects with a riak-like apps/ project structure and dev process

The vast majority of projects are not structured like riak. Therefore,
moving forward it's best to (by default) restrict recursive behavior to
dealing with deps. This commit does that and also adds command line and
rebar.config options for controlling or configuring recursion. Also, we
introduce two meta commands: prepare-deps (equivalent to rebar -r
get-deps compile) and refresh-deps (equivalent to rebar -r update-deps
compile). riak-like projects can extend the list of recursive commands
(to include 'eunit' and 'compile') by adding
{recursive_cmds, [eunit, compile]} to rebar.config.
2014-03-11 21:11:36 +00:00
Tuncer Ayaz
f2b370085c inttest/depplugins: update docs 2014-01-01 10:59:16 +01:00
Tuncer Ayaz
298743d50e Add test for regression caused by 252b31f (#90) 2014-01-01 10:59:16 +01:00
Tuncer Ayaz
0f8ef12341 inttest/rgen_1: double the timeout a second time
60s still seems to be too low, as it timed out for at least the R15B01
job of the timeout patch merge:
https://travis-ci.org/rebar/rebar/builds/15051701
https://travis-ci.org/rebar/rebar/jobs/15051703
2013-12-17 14:27:10 +01:00
Tuncer Ayaz
6de94e8a16 Change default log level to 'warn' and introduce -q/--quiet 2013-12-06 19:05:45 +01:00
Tuncer Ayaz
a3430a8053 inttest/rgen1: increase retest timeout (30s -> 60s)
The current default (30s) causes inttest/rgen1 to timeout too often. Add
retest.config to double the timeout.
2013-12-06 18:15:14 +01:00
Tuncer Ayaz
08a87bb5bd Delete unused inttest/retest binary 2013-11-27 17:05:12 +01:00
Andrew Thompson
d983beafe9 Don't over-aggressively clean the code path in the presence of lib_dir directives
Rebar, when it encounters a lib_dir directive, caches the current code
path, adds the libdir(s) and returns the cached copy of the path. When
rebar has finished processing that directory, it restores the cached
path. This is problematic in the below scenario:

        /(lib_dir)->G
  A -> B -> C -> D -> E
   \-> F -> D -> E

When rebar is finished processing B, it restores the code path to what
it was before it processed B, removing C, D, E and G from the code path.
This means when it comes to process F, neither D or E are in the code
path, so any header includes, rebar plugins or parse transforms will not
be in the code path. Without the lib_dir directive, rebar does no code
path cleanups, so everything works fine.

This change makes rebar only remove the explicit lib_dir code paths it
added and adds an inttest that replicates the above scenario.
2013-10-16 19:58:02 -04:00
Andrew Thompson
2b3edc2701 Typo 2013-10-14 13:44:05 -04:00
Andrew Thompson
e74de95eeb Address review comments and add inttest for update-deps 2013-09-30 16:57:50 -04:00
Dave Smith
638569acc2 Merge pull request #90 from Motiejus/dep_plugin
Fix searching for plugins
2013-05-21 05:22:43 -07:00
Motiejus Jakštys
252b31f2a4 Fix searching for plugins
If a plugin is in a dependency, rebar didn't search for it carefully
enough.
2013-05-19 16:33:29 +03:00
Dave Smith
9ad0a4a185 Additional travisci fixes 2013-04-23 06:42:16 -06:00
Dave Smith
a3ce71e381 Adding user/email on created repos for travis CI 2013-04-22 13:45:41 -06:00
Dave Smith
6bbd79044d Further investigation into travis CI issues 2013-04-22 13:39:42 -06:00
Dave Smith
c1925d0de7 Add author to fix issue when compiling on travis 2013-04-22 11:48:44 -06:00
Dave Smith
09c7e17e32 Remove hg from integration tests; git is defacto standard at this point 2013-03-02 08:22:09 -07:00
Anton Lavrik
0b833391ed Add support for non-Erlang/OTP (raw) dependencies
Introduce a new 'raw' option for dependency specs in rebar.config file.
For example:

{deps,
    {dependency_name, "1.0.*",
	 {git, "<...>", {branch, "master"}},
	 [raw]
    }
]}.

When this option is specified, rebar does not require the dependency to
have a standard Erlang/OTP layout which assumes presence of either
"src/dependency_name.app.src" or "ebin/dependency_name.app" files.

'raw' dependencies can still contain 'rebar.config' and even can have
the proper OTP directory layout, but they won't be compiled.

Only a subset of rebar commands will be executed on the 'raw'
subdirectories:

	get-deps, update-deps, check-deps, list-deps and delete-deps.
2012-10-11 02:06:08 -05:00
Tuncer Ayaz
48c7f53930 Fix inttest/ct2 ct spec file location (Thanks Peter Andersson)
The DirRef in the spec file is relative to the directory where the spec
file is located. ct2_rt was erroneously copying the spec file to test/.
2012-09-03 11:48:36 +02:00