Commit graph

94 commits

Author SHA1 Message Date
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
Tuncer Ayaz
0adf3d2461 inttest/ct2: enable rebar DEBUG log level 2012-09-03 11:41:41 +02:00
Tuncer Ayaz
e8557d262f inttest: remove superfluous blank lines 2012-08-18 19:36:28 +02:00
Tuncer Ayaz
c3c6ee7a55 inttest: fix whitespace errors 2012-08-18 19:29:29 +02:00
Tuncer Ayaz
c64c809faf Fix warning in inttest/tplugins/tplugins_rt.erl 2012-07-01 22:29:37 +02:00
Tuncer Ayaz
3da58e2272 Fix test: inttest/t_custom_config 2012-07-01 22:22:05 +02: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
Tim Watson
30d1cdb31b Fix config handling in root_dir
Avoid overwriting custom config (passed with -C) when we are processing
the base_dir in rebar_core.
2011-10-05 13:49:27 +02:00
Tim Watson
3b58935b86 Load plugins dynamically from source
This patch updates rebar_core to look for missing plugins (i.e. those
that aren't found on the code path at runtime) in a configurable
plugin directory, and dynamically compile and load them at runtime.

By default, the directory "plugins" is searched, although this can be
overriden by setting the plugin_dir in your rebar.config.
2011-08-29 17:27:45 +02:00
Tim Watson
5bb536f839 Respect the --config switch when given
Currently the --config switch does not work because when loading
a new rebar config the global setting is ignored for all paths.
This patch provides a check when loading new rebar config to see
whether or not the current config path matches the `base_dir` set in
global conf, which produces the expected behaviour.
2011-08-18 15:35:30 +02:00
Tim Watson
e76770511a Add pre and post script support for all commands
This change makes it possible to assign pre/post scripts to all
rebar commands. This allows users fine grained control over
when scripts and/or shell commands should be executed, where such
extensions are absolutely needed.

Several examples have been added to the rebar.config.sample file.
2011-03-12 16:31:41 +01:00
Tim Watson
3db8f585f1 Add -spec support to rebar_ct command line
This change adds support for executing ct test runs based on test
specificiations, which was missing previously. The rebar_ct module
now looks for any number of files with a name ending in `test.spec`
and if it finds one or more, passes these after the `-spec` argument
to ct_run instead of explicitly configuring the config, user config
and coverage config variables.

When no specifications are found, then the module behaves as it did
before this change, and both the ct1 and (new) ct2 integration tests
appear to show this is a backwards compatible patch.
2011-02-21 15:08:24 +01:00
Tuncer Ayaz
7710ab0d9f Fix warning 2011-01-31 19:11:50 +01:00
Tuncer Ayaz
c466076ffb Clean up emacs file local variables 2011-01-31 17:55:36 +01:00
Tuncer Ayaz
b18194e24d Fix file existence checks 2011-01-29 17:37:15 +01:00
Dave Smith
6ed20c95ba Adding simple test suite for common_test functionality 2010-06-22 15:41:39 -06:00
Dave Smith
2974110982 Fix bug in tdeps2_rt test; app files were not getting module list 2010-06-21 10:23:00 -06:00
Dave Smith
5677fe91b3 Updating retest
--HG--
extra : rebase_source : 5035f025b5873cedfb67e42159c5ce95b07c198d
2010-06-14 18:15:43 -06:00
Dave Smith
fbb6fc06c6 Adding test for new release generation overlay system
--HG--
extra : rebase_source : cd143fdf55773dcfbeeda687570b226def42e4f5
2010-06-14 18:14:23 -06:00
Dave Smith
299f3045be Updating integration tests
--HG--
extra : rebase_source : c0bfcfbbbca005eee2a3434cbe25494399b07532
2010-06-09 13:17:48 -06:00
Dave Smith
45c5956f21 Adding another transitive dep test
--HG--
extra : rebase_source : 1998dc102f89c3c809d5146c800218b5c5b6cba9
2010-06-09 10:25:28 -06:00
Dave Smith
166adf4029 Update retest w/ better handling of multi-statement shell commands; update tdeps1_rt to use it
--HG--
extra : rebase_source : 010907d47b360288825cb9c841d62450700be225
2010-06-08 16:07:20 -06:00
Dave Smith
fa3cc9c7d5 Updating retest 2010-06-08 14:52:16 -06:00
Dave Smith
1df2b6d41c Adding transitive deps test #1 2010-06-08 14:51:49 -06:00
Dave Smith
623200ec17 Adding rt for bug 5 2010-06-04 12:21:24 -06:00