diff options
author | Siri Hansen <[email protected]> | 2016-03-09 11:09:34 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-03-09 11:09:34 +0100 |
commit | aeccfd1c8441ac0caa0c86aac19747eb64bd267d (patch) | |
tree | c966abd0608a50aab2590671101090e819feb59d /lib/common_test/src/ct_release_test.erl | |
parent | 0b7c58e52ab6650d41be2ca58c4dc301287ba68a (diff) | |
parent | 2e8369fa0932e076bda89fa6f15f9f3b99de074a (diff) | |
download | otp-aeccfd1c8441ac0caa0c86aac19747eb64bd267d.tar.gz otp-aeccfd1c8441ac0caa0c86aac19747eb64bd267d.tar.bz2 otp-aeccfd1c8441ac0caa0c86aac19747eb64bd267d.zip |
Merge branch 'maint'
Conflicts:
lib/common_test/test/Makefile
Diffstat (limited to 'lib/common_test/src/ct_release_test.erl')
-rw-r--r-- | lib/common_test/src/ct_release_test.erl | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/lib/common_test/src/ct_release_test.erl b/lib/common_test/src/ct_release_test.erl index c4cbe0c424..6c38f51363 100644 --- a/lib/common_test/src/ct_release_test.erl +++ b/lib/common_test/src/ct_release_test.erl @@ -131,7 +131,7 @@ -include_lib("kernel/include/file.hrl"). %%----------------------------------------------------------------- --define(testnode, otp_upgrade). +-define(testnode, 'ct_release_test-upgrade'). -define(exclude_apps, [hipe, typer, dialyzer]). % never include these apps %%----------------------------------------------------------------- @@ -304,7 +304,13 @@ upgrade(Apps,Level,Callback,Config) -> %% Note, we will not reach this if the test fails with a %% timetrap timeout in the test suite! Thus we can have %% hanging nodes... - Nodes = nodes(), + Nodes = lists:filter(fun(Node) -> + case atom_to_list(Node) of + "ct_release_test-" ++_ -> true; + _ -> false + end + end, + nodes()), [rpc:call(Node,erlang,halt,[]) || Node <- Nodes] end. @@ -328,7 +334,14 @@ upgrade(Apps,Level,Callback,Config) -> %% ct_release_test:cleanup(Config).''' %% cleanup(Config) -> - Nodes = [node_name(?testnode)|nodes()], + AllNodes = [node_name(?testnode)|nodes()], + Nodes = lists:filter(fun(Node) -> + case atom_to_list(Node) of + "ct_release_test-" ++_ -> true; + _ -> false + end + end, + AllNodes), [rpc:call(Node,erlang,halt,[]) || Node <- Nodes], Config. @@ -455,9 +468,9 @@ get_rels(minor) -> {CurrentMajor,Current}. init_upgrade_test(FromVsn,ToVsn,OldRel) -> - OtpRel = list_to_atom("otp-"++FromVsn), + Name = list_to_atom("ct_release_test-otp-"++FromVsn), ct:log("Starting node to fetch application versions to upgrade from"), - {ok,Node} = test_server:start_node(OtpRel,peer,[{erl,[OldRel]}]), + {ok,Node} = test_server:start_node(Name,peer,[{erl,[OldRel]}]), {Apps,Path} = fetch_all_apps(Node), test_server:stop_node(Node), {FromVsn,ToVsn,Apps,Path}. @@ -723,7 +736,7 @@ do_callback(Node,Mod,Func,Args) -> ct:log("~p:~p/~w returned: ~p",[Mod,Func,length(Args),R]), case R of {badrpc,Error} -> - test_server:fail({test_upgrade_callback,Mod,Func,Args,Error}); + throw({fail,{test_upgrade_callback,Mod,Func,Args,Error}}); NewState -> NewState end. |