aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2015-01-28 15:26:09 +0100
committerSiri Hansen <[email protected]>2015-01-28 15:26:09 +0100
commite927d74ef110fe333e3283ff98281f81761dc7d7 (patch)
tree58378a249a8fca7c499cade876d6e1307856f1b3 /lib/stdlib
parent44b9dba3eac0864e80851af6bd8375d597043645 (diff)
downloadotp-e927d74ef110fe333e3283ff98281f81761dc7d7.tar.gz
otp-e927d74ef110fe333e3283ff98281f81761dc7d7.tar.bz2
otp-e927d74ef110fe333e3283ff98281f81761dc7d7.zip
[ct] Improve support for upgrade test of application
Add functions: ct_release_test:get_app_vsns/2 ct_release_test:get_appup/2 This implies a change in callback functions for ct_release_test, which now all have two arguments - [CtData,State]. The new CtData is an opaque data structure which must be given as the first argument to the two new functions.
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/test/stdlib_SUITE.erl15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/stdlib/test/stdlib_SUITE.erl b/lib/stdlib/test/stdlib_SUITE.erl
index 6669a21b9c..206eb4fd74 100644
--- a/lib/stdlib/test/stdlib_SUITE.erl
+++ b/lib/stdlib/test/stdlib_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2014. All Rights Reserved.
+%% Copyright Ericsson AB 1997-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
@@ -172,9 +172,16 @@ major_upgrade(Config) ->
%% Version numbers are checked by ct_release_test, so there is nothing
%% more to check here...
-upgrade_init(State) ->
+upgrade_init(CtData,State) ->
+ {ok,{FromVsn,ToVsn}} = ct_release_test:get_app_vsns(CtData,stdlib),
+ case ct_release_test:get_appup(CtData,stdlib) of
+ {ok,{FromVsn,ToVsn,[restart_new_emulator],[restart_new_emulator]}} ->
+ io:format("Upgrade/downgrade ~p <--> ~p",[FromVsn,ToVsn]);
+ {error,{vsn_not_found,_}} when FromVsn==ToVsn ->
+ io:format("No upgrade test for stdlib, same version")
+ end,
State.
-upgrade_upgraded(State) ->
+upgrade_upgraded(_CtData,State) ->
State.
-upgrade_downgraded(State) ->
+upgrade_downgraded(_CtData,State) ->
State.