aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl/test/release_handler_SUITE.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2015-01-14 12:12:44 +0100
committerSiri Hansen <[email protected]>2015-01-14 12:12:44 +0100
commitfa020e2c9e39bcefea13b24a1b5100ae670506f8 (patch)
tree413d8454910195c2a55ceab94adbdc43b941e003 /lib/sasl/test/release_handler_SUITE.erl
parent06b359e3c126804045b9b14852d14b46c2e1fee9 (diff)
downloadotp-fa020e2c9e39bcefea13b24a1b5100ae670506f8.tar.gz
otp-fa020e2c9e39bcefea13b24a1b5100ae670506f8.tar.bz2
otp-fa020e2c9e39bcefea13b24a1b5100ae670506f8.zip
[sasl] Make test unreliable of kernel.appup
release_handler_SUITE:otp_10463_upgrade_script_regexp reads kernel.appup and tries to fetch upgrade instructions for upgrade from current version to current version. The point of the test is to see that release_handler can read an appup with regexps. In some cases, however, kernel.appup does not support upgrade from current to current version, since this is not necessary in real life. Therefore this test is now updated to use a dummy application (release_handler_SUITE_data/regexp_appup/app1) for this test.
Diffstat (limited to 'lib/sasl/test/release_handler_SUITE.erl')
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index bd7414fbb4..b7c5f34f58 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2014. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2015. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1802,11 +1802,17 @@ upgrade_gg(cleanup,Config) ->
%%%-----------------------------------------------------------------
%%% OTP-10463, Bug - release_handler could not handle regexp in appup
%%% files.
-otp_10463_upgrade_script_regexp(_Config) ->
- %% Assuming that kernel always has a regexp in it's appup
- KernelVsn = vsn(kernel,current),
- {ok,KernelVsn,_} =
- release_handler:upgrade_script(kernel,code:lib_dir(kernel)),
+otp_10463_upgrade_script_regexp(Config) ->
+ DataDir = ?config(data_dir,Config),
+ code:add_path(filename:join([DataDir,regexp_appup,app1,ebin])),
+ application:start(app1),
+ {ok,"1.1",_} = release_handler:upgrade_script(app1,code:lib_dir(app1)),
+ ok.
+
+otp_10463_upgrade_script_regexp(cleanup,Config) ->
+ DataDir = ?config(data_dir,Config),
+ application:stop(app1),
+ code:del_path(filename:join([DataDir,regexp_appup,app1,ebin])),
ok.
no_dot_erlang(Conf) ->