aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric <[email protected]>2012-12-28 11:47:35 -0500
committerEric <[email protected]>2012-12-28 11:47:35 -0500
commitae2e47e811ef113c0e6ab1df2bb66a4917f7ea07 (patch)
treee2bf405b7fcc8b3d54bcfb27abb0b5809ee0c7eb /test
parentb5b6cf855b3bceaac76ccd330d64cfeb2b1f4c14 (diff)
downloadrelx-ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07.tar.gz
relx-ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07.tar.bz2
relx-ae2e47e811ef113c0e6ab1df2bb66a4917f7ea07.zip
support the ability to *not* autogenerate start scripts
Diffstat (limited to 'test')
-rw-r--r--test/rclt_release_SUITE.erl47
1 files changed, 44 insertions, 3 deletions
diff --git a/test/rclt_release_SUITE.erl b/test/rclt_release_SUITE.erl
index 06644ee..848c129 100644
--- a/test/rclt_release_SUITE.erl
+++ b/test/rclt_release_SUITE.erl
@@ -25,6 +25,7 @@
init_per_testcase/2,
all/0,
make_release/1,
+ make_scriptless_release/1,
make_overridden_release/1,
make_rerun_overridden_release/1,
make_implicit_config_release/1,
@@ -52,8 +53,9 @@ init_per_testcase(_, Config) ->
{state, State} | Config].
all() ->
- [make_release, make_overridden_release, make_implicit_config_release,
- make_rerun_overridden_release, overlay_release].
+ [make_release, make_scriptless_release, make_overridden_release,
+ make_implicit_config_release, make_rerun_overridden_release,
+ overlay_release].
make_release(Config) ->
LibDir1 = proplists:get_value(lib1, Config),
@@ -90,6 +92,46 @@ make_release(Config) ->
?assert(lists:member({goal_app_2, "0.0.1"}, AppSpecs)),
?assert(lists:member({lib_dep_1, "0.0.1", load}, AppSpecs)).
+make_scriptless_release(Config) ->
+ LibDir1 = proplists:get_value(lib1, Config),
+ [(fun({Name, Vsn}) ->
+ create_app(LibDir1, Name, Vsn, [kernel, stdlib], [])
+ end)(App)
+ ||
+ App <-
+ [{create_random_name("lib_app1_"), create_random_vsn()}
+ || _ <- lists:seq(1, 100)]],
+
+ create_app(LibDir1, "goal_app_1", "0.0.1", [stdlib,kernel,non_goal_1], []),
+ create_app(LibDir1, "lib_dep_1", "0.0.1", [stdlib,kernel], []),
+ create_app(LibDir1, "goal_app_2", "0.0.1", [stdlib,kernel,goal_app_1,non_goal_2], []),
+ create_app(LibDir1, "non_goal_1", "0.0.1", [stdlib,kernel], [lib_dep_1]),
+ create_app(LibDir1, "non_goal_2", "0.0.1", [stdlib,kernel], []),
+
+ ConfigFile = filename:join([LibDir1, "relcool.config"]),
+ write_config(ConfigFile,
+ [{generate_start_script, false},
+ {release, {foo, "0.0.1"},
+ [goal_app_1,
+ goal_app_2]}]),
+ OutputDir = filename:join([proplists:get_value(data_dir, Config),
+ create_random_name("relcool-output")]),
+ {ok, State} = relcool:do(undefined, undefined, [], [LibDir1], 2,
+ OutputDir, [ConfigFile]),
+
+ ?assert(not ec_file:exists(filename:join([OutputDir, "bin", "foo"]))),
+ ?assert(not ec_file:exists(filename:join([OutputDir, "bin", "foo-0.0.1"]))),
+
+ [{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
+ AppSpecs = rcl_release:applications(Release),
+ ?assert(lists:keymember(stdlib, 1, AppSpecs)),
+ ?assert(lists:keymember(kernel, 1, AppSpecs)),
+ ?assert(lists:member({non_goal_1, "0.0.1"}, AppSpecs)),
+ ?assert(lists:member({non_goal_2, "0.0.1"}, AppSpecs)),
+ ?assert(lists:member({goal_app_1, "0.0.1"}, AppSpecs)),
+ ?assert(lists:member({goal_app_2, "0.0.1"}, AppSpecs)),
+ ?assert(lists:member({lib_dep_1, "0.0.1", load}, AppSpecs)).
+
make_overridden_release(Config) ->
DataDir = proplists:get_value(data_dir, Config),
@@ -171,7 +213,6 @@ make_implicit_config_release(Config) ->
OutputDir, []),
[{{foo, "0.0.1"}, Release}] = ec_dictionary:to_list(rcl_state:releases(State)),
?assert(ec_file:exists(OutputDir)),
-
AppSpecs = rcl_release:applications(Release),
?assert(lists:keymember(stdlib, 1, AppSpecs)),
?assert(lists:keymember(kernel, 1, AppSpecs)),