diff options
author | Siri Hansen <[email protected]> | 2010-08-17 13:34:35 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2011-05-17 11:32:33 +0200 |
commit | 87fce5499baa1824eebe822cc62608c5bb58d3cf (patch) | |
tree | ee51c2c3b900ab1fea891ae3e9b7403e5173af52 /lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src | |
parent | c1e2d6d62e9932b3d438fb9466ab716c81b252c2 (diff) | |
download | otp-87fce5499baa1824eebe822cc62608c5bb58d3cf.tar.gz otp-87fce5499baa1824eebe822cc62608c5bb58d3cf.tar.bz2 otp-87fce5499baa1824eebe822cc62608c5bb58d3cf.zip |
Add SASL test suite
Diffstat (limited to 'lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src')
-rw-r--r-- | lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl | 47 | ||||
-rw-r--r-- | lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl | 37 |
2 files changed, 84 insertions, 0 deletions
diff --git a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl new file mode 100644 index 0000000000..cfe38b55ce --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a.erl @@ -0,0 +1,47 @@ +%% ``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 +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved via the world wide web at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. +%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings +%% AB. All Rights Reserved.'' +%% +%% $Id$ +%% +-module(a). + + +-behaviour(gen_server). + +%% External exports +-export([start_link/0, a/0]). +%% Internal exports +-export([init/1, handle_call/3, handle_info/2, terminate/2]). + +start_link() -> gen_server:start_link({local, aa}, a, [], []). + +a() -> gen_server:call(aa, a). + +%%----------------------------------------------------------------- +%% Callback functions from gen_server +%%----------------------------------------------------------------- +init([]) -> + process_flag(trap_exit, true), + {ok, state}. + +handle_call(a, _From, State) -> + X = application:get_all_env(a), + {reply, X, State}. + +handle_info(_, State) -> + {noreply, State}. + +terminate(_Reason, _State) -> + ok. diff --git a/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl new file mode 100644 index 0000000000..a141c1767b --- /dev/null +++ b/lib/sasl/test/release_handler_SUITE_data/P2B/a-2.0/src/a_sup.erl @@ -0,0 +1,37 @@ +%% ``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 +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved via the world wide web at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. +%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings +%% AB. All Rights Reserved.'' +%% +%% $Id$ +%% +-module(a_sup). + + +-behaviour(supervisor). + +%% External exports +-export([start/2]). + +%% Internal exports +-export([init/1]). + +start(_, _) -> + supervisor:start_link({local, a_sup}, a_sup, []). + +init([]) -> + SupFlags = {one_for_one, 4, 3600}, + Config = {a, + {a, start_link, []}, + permanent, 2000, worker, [a]}, + {ok, {SupFlags, [Config]}}. |