aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKonrad Kaplita <[email protected]>2013-11-18 13:54:07 +0100
committerKonrad Kaplita <[email protected]>2013-12-03 12:14:11 +0100
commit95c4565d078033c18561813c48c20de11ed9ab88 (patch)
tree1ced40925aef4edf196ec3040b571f187f0272ef /test
parent04a0d907ae17cdc9b9c62130a009138b8580ff43 (diff)
downloadrelx-95c4565d078033c18561813c48c20de11ed9ab88.tar.gz
relx-95c4565d078033c18561813c48c20de11ed9ab88.tar.bz2
relx-95c4565d078033c18561813c48c20de11ed9ab88.zip
Add option to skip release discovery
`rlx_prv_discover` provider recursively scans all directories in `lib_dirs` list looking for `*.app` and `*.rel` files. This commit adds an option `disable_rel_discovery` to skip searching for `*.rel` files when we know there aren't any. This speeds up release generation with a lot of dependencies on the `libs_dir` list significantly and reduces total release generation time in half.
Diffstat (limited to 'test')
-rw-r--r--test/rlx_discover_SUITE.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/rlx_discover_SUITE.erl b/test/rlx_discover_SUITE.erl
index e75ea36..0fb1ad7 100644
--- a/test/rlx_discover_SUITE.erl
+++ b/test/rlx_discover_SUITE.erl
@@ -110,10 +110,12 @@ no_beam_case(Config) ->
AppDir = filename:join([LibDir2, BadName]),
write_app_file(AppDir, BadName, BadVsn),
State0 = proplists:get_value(state, Config),
- {DiscoverProvider, {ok, State1}} = rlx_provider:new(rlx_prv_discover, State0),
+ %% Deliberately disable release discovery when running `rlx_prv_discover`
+ State1 = rlx_state:put(State0, disable_rel_discovery, true),
+ {DiscoverProvider, {ok, State2}} = rlx_provider:new(rlx_prv_discover, State1),
?assertMatch({ok, _},
- rlx_provider:do(DiscoverProvider, State1)).
+ rlx_provider:do(DiscoverProvider, State2)).
bad_ebin_case(Config) ->
LibDir1 = proplists:get_value(lib1, Config),