aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reltool/test/reltool_server_SUITE.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-03-27 11:25:18 +0100
committerSiri Hansen <[email protected]>2013-03-27 11:32:04 +0100
commitade77a73b0b3ae4b1502be47596e4f428e644b43 (patch)
tree4d3e69eff4c6310c9e2bc1d518cc30e2eb714a99 /lib/reltool/test/reltool_server_SUITE.erl
parentb757069c9ed0ddce0d74d11242029cf6bbf551a2 (diff)
downloadotp-ade77a73b0b3ae4b1502be47596e4f428e644b43.tar.gz
otp-ade77a73b0b3ae4b1502be47596e4f428e644b43.tar.bz2
otp-ade77a73b0b3ae4b1502be47596e4f428e644b43.zip
[reltool] Add test case for missing application
Diffstat (limited to 'lib/reltool/test/reltool_server_SUITE.erl')
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl30
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index a667de5969..adea716e99 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -80,6 +80,7 @@ all() ->
otp_9229_dupl_mod_exclude_app,
otp_9229_dupl_mod_exclude_mod,
dupl_mod_in_app_file,
+ include_non_existing_app,
exclude_non_existing_app,
get_apps,
get_mod,
@@ -1346,8 +1347,33 @@ dupl_mod_in_app_file(Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Test that if an application is explicitly excluded a warning should
-%% be issued.
+%% Test that a reasonable error message is returned if an application
+%% is missing
+include_non_existing_app(_Config) ->
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {incl_cond,exclude},
+ {app,foobar,[{incl_cond,include}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "target_include_non_existing_app"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Sys}])]),
+ ?m({error,"foobar: Missing application directory."},
+ reltool:get_status([{config, Sys}])),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test that if a missing application is explicitly excluded a warning
+%% should be issued.
exclude_non_existing_app(_Config) ->
%% Configure the server
Sys =