diff options
author | Peter Andersson <[email protected]> | 2011-07-14 14:18:57 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-09-23 12:24:54 +0200 |
commit | 021b0dcb2a3a86ec0e07b0de8dc7cde9be0924ba (patch) | |
tree | db0243654226afff8b63b55076ca058a135cfff0 /lib/common_test/src/vts.erl | |
parent | f703d6512219431fa7fe61e5ddd1a9ed32506daa (diff) | |
download | otp-021b0dcb2a3a86ec0e07b0de8dc7cde9be0924ba.tar.gz otp-021b0dcb2a3a86ec0e07b0de8dc7cde9be0924ba.tar.bz2 otp-021b0dcb2a3a86ec0e07b0de8dc7cde9be0924ba.zip |
Introduce new 'logopts' flag
Introduce new 'logopts' flag and make it possible to modify the default logging behaviour
OTP-9372
OTP-9396
Diffstat (limited to 'lib/common_test/src/vts.erl')
-rw-r--r-- | lib/common_test/src/vts.erl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/common_test/src/vts.erl b/lib/common_test/src/vts.erl index f0bf090804..9eb11c23cc 100644 --- a/lib/common_test/src/vts.erl +++ b/lib/common_test/src/vts.erl @@ -20,7 +20,7 @@ -module(vts). -export([start/0, - init_data/4, + init_data/5, stop/0, report/2]). @@ -56,7 +56,7 @@ -record(state,{tests=[],config=[],event_handler=[],test_runner, running=0,reload_results=false,start_dir,current_log_dir, - total=0,ok=0,fail=0,skip=0,testruns=[]}). + logopts=[],total=0,ok=0,fail=0,skip=0,testruns=[]}). %%%----------------------------------------------------------------- @@ -65,8 +65,8 @@ start() -> webtool:start(), webtool:start_tools([],"app=vts"). -init_data(ConfigFiles,EvHandlers,LogDir,Tests) -> - call({init_data,ConfigFiles,EvHandlers,LogDir,Tests}). +init_data(ConfigFiles,EvHandlers,LogDir,LogOpts,Tests) -> + call({init_data,ConfigFiles,EvHandlers,LogDir,LogOpts,Tests}). stop() -> webtool:stop_tools([],"app=vts"), @@ -160,10 +160,11 @@ init(Parent) -> loop(State) -> receive - {{init_data,Config,EvHandlers,LogDir,Tests},From} -> + {{init_data,Config,EvHandlers,LogDir,LogOpts,Tests},From} -> %% ct:pal("State#state.current_log_dir=~p", [State#state.current_log_dir]), NewState = State#state{config=Config,event_handler=EvHandlers, - current_log_dir=LogDir,tests=Tests}, + current_log_dir=LogDir, + logopts=LogOpts,tests=Tests}, ct_install(NewState), return(From,ok), loop(NewState); @@ -270,10 +271,11 @@ return({To,Ref},Result) -> To ! {Ref, Result}. -run_test1(State=#state{tests=Tests,current_log_dir=LogDir}) -> +run_test1(State=#state{tests=Tests,current_log_dir=LogDir, + logopts=LogOpts}) -> Self=self(), RunTest = fun() -> - case ct_run:do_run(Tests,[],LogDir) of + case ct_run:do_run(Tests,[],LogDir,LogOpts) of {error,_Reason} -> aborted(); _ -> |