diff options
author | Peter Andersson <[email protected]> | 2011-07-08 20:46:17 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-09-23 12:24:53 +0200 |
commit | 0075b97214d6c037eca3888bca29d68c9b5fbb74 (patch) | |
tree | 06734de9077352d0422a0525b1cbfbb1b0bd2041 /lib/common_test/src/ct_logs.erl | |
parent | 312005eb3d09f5bf00ce129c1dd900de1475fc0a (diff) | |
download | otp-0075b97214d6c037eca3888bca29d68c9b5fbb74.tar.gz otp-0075b97214d6c037eca3888bca29d68c9b5fbb74.tar.bz2 otp-0075b97214d6c037eca3888bca29d68c9b5fbb74.zip |
Modify start options and introduce CT profiles
OTP-9155: Improve handling of start options in Common Test
OTP-9428: Introduce first version of CT profiles (for evaluation)
Diffstat (limited to 'lib/common_test/src/ct_logs.erl')
-rw-r--r-- | lib/common_test/src/ct_logs.erl | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl index b839521e24..5c4eb88c1f 100644 --- a/lib/common_test/src/ct_logs.erl +++ b/lib/common_test/src/ct_logs.erl @@ -28,7 +28,7 @@ -module(ct_logs). --export([init/1,close/1,init_tc/0,end_tc/1]). +-export([init/1,close/2,init_tc/0,end_tc/1]). -export([get_log_dir/0,log/3,start_log/1,cont_log/2,end_log/0]). -export([set_stylesheet/2,clear_stylesheet/1]). -export([add_external_logs/1,add_link/3]). @@ -97,11 +97,11 @@ logdir_node_prefix() -> logdir_prefix()++"."++atom_to_list(node()). %%%----------------------------------------------------------------- -%%% @spec close(Info) -> ok +%%% @spec close(Info, StartDir) -> ok %%% %%% @doc Create index pages with test results and close the CT Log %%% (tool-internal use only). -close(Info) -> +close(Info, StartDir) -> make_last_run_index(), ct_event:notify(#event{name=stop_logging,node=node(),data=[]}), @@ -132,6 +132,21 @@ close(Info) -> make_all_suites_index(stop), make_all_runs_index(stop), + case ct_util:get_profile_data(browser, StartDir) of + undefined -> + ok; + BrowserData -> + case {proplists:get_value(prog, BrowserData), + proplists:get_value(args, BrowserData), + proplists:get_value(page, BrowserData)} of + {Prog,Args,Page} when is_list(Args), + is_list(Page) -> + URL = "file://" ++ ?abs(Page), + ct_util:open_url(Prog, Args, URL); + _ -> + ok + end + end, ok. %%%----------------------------------------------------------------- |