From 3fef8ee7031a16a038c9f87dc8cf8ea44064e6ed Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 25 Jan 2012 16:24:35 +0100 Subject: [reltool] Add more GUI tests OTP-9794 This commit adds a test suite for manual testing of the reltool GUI. By use of test_server:break/1 function, it guides the user through a set of tests in the GUI. Some minor checks are also added to the automatic GUI test, reltool_wx_SUITE. --- .../reltool_manual_gui_SUITE_data/Makefile.src | 28 +++++++++++++ .../dependencies/x-1.0/ebin/x.app | 7 ++++ .../dependencies/x-1.0/src/x1.erl | 5 +++ .../dependencies/x-1.0/src/x2.erl | 5 +++ .../dependencies/x-1.0/src/x3.erl | 5 +++ .../dependencies/y-1.0/ebin/y.app | 7 ++++ .../dependencies/y-1.0/src/y1.erl | 5 +++ .../dependencies/y-1.0/src/y2.erl | 5 +++ .../dependencies/y-1.0/src/y3.erl | 5 +++ .../dependencies/z-1.0/ebin/z.app | 7 ++++ .../dependencies/z-1.0/src/z1.erl | 5 +++ .../faulty_app_file/a-1.0/ebin/a.app | 1 + .../faulty_app_file/a-1.0/src/a.erl | 49 ++++++++++++++++++++++ .../faulty_app_file/a-1.0/src/a_sup.erl | 37 ++++++++++++++++ 14 files changed, 171 insertions(+) create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl create mode 100644 lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl (limited to 'lib/reltool/test/reltool_manual_gui_SUITE_data') diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src b/lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src new file mode 100644 index 0000000000..9a340274ad --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/Makefile.src @@ -0,0 +1,28 @@ +EFLAGS=+debug_info + +DEPENDENCIES= \ + dependencies/x-1.0/ebin/x1.@EMULATOR@ \ + dependencies/x-1.0/ebin/x2.@EMULATOR@ \ + dependencies/x-1.0/ebin/x3.@EMULATOR@ \ + dependencies/y-1.0/ebin/y1.@EMULATOR@ \ + dependencies/y-1.0/ebin/y2.@EMULATOR@ \ + dependencies/y-1.0/ebin/y3.@EMULATOR@ \ + dependencies/z-1.0/ebin/z1.@EMULATOR@ + + +all: $(DEPENDENCIES) + +dependencies/x-1.0/ebin/x1.@EMULATOR@: dependencies/x-1.0/src/x1.erl + erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x1.erl +dependencies/x-1.0/ebin/x2.@EMULATOR@: dependencies/x-1.0/src/x2.erl + erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x2.erl +dependencies/x-1.0/ebin/x3.@EMULATOR@: dependencies/x-1.0/src/x3.erl + erlc $(EFLAGS) -odependencies/x-1.0/ebin dependencies/x-1.0/src/x3.erl +dependencies/y-1.0/ebin/y1.@EMULATOR@: dependencies/y-1.0/src/y1.erl + erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y1.erl +dependencies/y-1.0/ebin/y2.@EMULATOR@: dependencies/y-1.0/src/y2.erl + erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y2.erl +dependencies/y-1.0/ebin/y3.@EMULATOR@: dependencies/y-1.0/src/y3.erl + erlc $(EFLAGS) -odependencies/y-1.0/ebin dependencies/y-1.0/src/y3.erl +dependencies/z-1.0/ebin/z1.@EMULATOR@: dependencies/z-1.0/src/z1.erl + erlc $(EFLAGS) -odependencies/z-1.0/ebin dependencies/z-1.0/src/z1.erl diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app new file mode 100644 index 0000000000..ccaab8a8c7 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/ebin/x.app @@ -0,0 +1,7 @@ +% -*-erlang-*- +{application, x, + [{description, "Main application in reltool dependency test"}, + {vsn, "1.0"}, + {modules, [x1,x2,x3]}, + {registered, []}, + {applications, [kernel, stdlib]}]}. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl new file mode 100644 index 0000000000..bf1e7f9279 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x1.erl @@ -0,0 +1,5 @@ +-module(x1). +-compile(export_all). + +f() -> + ok. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl new file mode 100644 index 0000000000..82191ba278 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x2.erl @@ -0,0 +1,5 @@ +-module(x2). +-compile(export_all). + +f() -> + y1:f(). diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl new file mode 100644 index 0000000000..618c75c9a7 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/x-1.0/src/x3.erl @@ -0,0 +1,5 @@ +-module(x3). +-compile(export_all). + +f() -> + y2:f(). diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app new file mode 100644 index 0000000000..4f9b610b69 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/ebin/y.app @@ -0,0 +1,7 @@ +% -*-erlang-*- +{application, y, + [{description, "Library application in reltool dependency test"}, + {vsn, "1.0"}, + {modules, [y1,y2]}, % y3 is skipped on purpose - to test module inclusion policy + {registered, []}, + {applications, [kernel, stdlib]}]}. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl new file mode 100644 index 0000000000..dd21b33292 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y1.erl @@ -0,0 +1,5 @@ +-module(y1). +-compile(export_all). + +f() -> + z1:f(). diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl new file mode 100644 index 0000000000..bf8ddf6080 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y2.erl @@ -0,0 +1,5 @@ +-module(y2). +-compile(export_all). + +f() -> + ok. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl new file mode 100644 index 0000000000..915d64d5b9 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/y-1.0/src/y3.erl @@ -0,0 +1,5 @@ +-module(y3). +-compile(export_all). + +f() -> + ok. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app new file mode 100644 index 0000000000..437a0968e9 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/ebin/z.app @@ -0,0 +1,7 @@ +% -*-erlang-*- +{application, z, + [{description, "Library application in reltool dependency test"}, + {vsn, "1.0"}, + {modules, [z1]}, + {registered, []}, + {applications, [kernel, stdlib]}]}. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl new file mode 100644 index 0000000000..97ef90b87f --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/dependencies/z-1.0/src/z1.erl @@ -0,0 +1,5 @@ +-module(z1). +-compile(export_all). + +f() -> + ok. diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app new file mode 100644 index 0000000000..ea77103598 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/ebin/a.app @@ -0,0 +1 @@ +faulty app file diff --git a/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl new file mode 100644 index 0000000000..bb500bed69 --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a.erl @@ -0,0 +1,49 @@ +%% ``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). + +-vsn(1). + +%% 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/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.0/src/a_sup.erl new file mode 100644 index 0000000000..a141c1767b --- /dev/null +++ b/lib/reltool/test/reltool_manual_gui_SUITE_data/faulty_app_file/a-1.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]}}. -- cgit v1.2.3