Commit graph

84 commits

Author SHA1 Message Date
Fred Hebert
b8e0018782 Merge pull request #413 from tomas-abrahamsson/undo-386-merge
Revert "Merge pull request #386 ... gpb-recompilation...detection"
2014-12-30 13:27:02 -05:00
Tomas Abrahamsson
a7b7205d07 Revert "Merge pull request #386 from tomas-abrahamsson/gpb-recompilation-detection"
This reverts commit 81063d33f0, reversing
changes made to 6584defdda.

This was reverted because it changed the gpb compiler to
not use rebar_base_compiler.  That change was to add support for
target name prefixes, but it is better to add that support to
rebar_base_compiler.
2014-12-23 16:28:23 +01:00
Igor Savchuk
d5d691d7f7 Fix app.config argument passing when using ct_run (take 2)
ct_run has changed its config key from -ct_config to -config,
thus, -config key, used to specify app.config now must be
placed after -erl_args
2014-12-22 21:36:41 +03:00
Fred Hebert
ae7a7aae18 Revert "Merge branch 'kittee-ct_appconfig_fix'"
This reverts commit 3c0f420c2a, reversing
changes made to 8f64e13184.
2014-12-21 15:25:00 -05:00
Fred Hebert
440d73825b Merge branch 'ct_appconfig_fix' of https://github.com/kittee/rebar into kittee-ct_appconfig_fix
Conflicts:
	THANKS
2014-12-21 15:17:03 -05:00
Fred Hebert
81063d33f0 Merge pull request #386 from tomas-abrahamsson/gpb-recompilation-detection
Recompile .proto files with gpb also with prefix/suffix
2014-12-21 15:03:05 -05:00
Fred Hebert
6584defdda Merge pull request #406 from stwind/master
Fix deps path check in rebar_ct:collect_glob/3
2014-12-21 15:02:39 -05:00
stwind
a83c80d4c0 Fix deps path check in rebar_ct:collect_glob/3
Since rebar_deps:get_deps_dir/1 returns an absolute path,
lists:member(Deps, Parts2) will always return false, thus .test.spec
files in deps/ will not be ignored.
2014-12-11 11:59:40 +08:00
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
Igor Savchuk
bc46b501d0 Fix app.config argument passing when using ct_run
ct_run has changed its config key from -ct_config to -config,
thus, -config key, used to specify app.config now must be
placed after -erl_args
2014-11-28 16:48:47 +03: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
Tomas Abrahamsson
51b34a6e52 Recompile .proto files with gpb also with prefix/suffix
For protocol buffer files, when there were gpb options to alter the
module name with prefix or suffix, recompilation was not properly
detected. This is now fixed. (Issue #384).

Properly detecting change meant moving from rebar_base_compiler, so it
also meant processing protocol buffer files in sequence instead of in
parallel.
2014-11-05 00:31:52 +01: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