aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common_test/src')
-rwxr-xr-xlib/common_test/src/ct_config.erl10
-rw-r--r--lib/common_test/src/ct_run.erl1
-rw-r--r--lib/common_test/src/ct_testspec.erl18
-rw-r--r--lib/common_test/src/ct_util.hrl1
-rw-r--r--lib/common_test/src/vts.erl8
5 files changed, 22 insertions, 16 deletions
diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl
index 8e2f71647f..bc57930381 100755
--- a/lib/common_test/src/ct_config.erl
+++ b/lib/common_test/src/ct_config.erl
@@ -198,13 +198,13 @@ get_config_file_list(Opts)->
DefaultConfigs == []->
[];
true->
- [{ct_config_plain, DefaultConfigs}]
+ [{?ct_config_txt, DefaultConfigs}]
end ++
process_user_configs(Opts, []),
CfgFiles.
read_config_files(Opts) ->
- ct:pal("ct_config:read_config_files/1:~nOpts:~n~p", [Opts]),
+ %ct:pal("ct_config:read_config_files/1:~nOpts:~n~p", [Opts]),
AddCallback = fun(CallBack, [])->
[{CallBack, []}];
(CallBack, Files)->
@@ -220,7 +220,7 @@ read_config_files(Opts) ->
false->
[]
end,
- ct:pal("ct_config:read_config_files/1:~nConfigFiles:~n~p", [ConfigFiles]),
+ %ct:pal("ct_config:read_config_files/1:~nConfigFiles:~n~p", [ConfigFiles]),
read_config_files_int(ConfigFiles, fun store_config/3).
read_config_files_int([{Callback, File}|Files], FunToSave)->
@@ -687,7 +687,7 @@ check_callback_load(Callback)->
end.
check_config_files(Configs)->
- ct:pal("ct_config:check_config_files(~p)", [Configs]),
+ ct:pal("ct_config:check_config_files/1~nConfigs:~n~p", [Configs]),
lists:keysearch(nok, 1,
lists:flatten(
lists:map(fun({Callback, Files})->
@@ -719,7 +719,7 @@ prepare_user_configs([], Acc, _)->
prepare_config_list(Args)->
ConfigFiles = case lists:keysearch(ct_config, 1, Args) of
{value,{ct_config,Files}}->
- [{ct_config_plain, Files}];
+ [{?ct_config_txt, Files}];
false->
[]
end,
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index cf5c99ee19..0e7da60821 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -467,6 +467,7 @@ install(Opts, LogDir) ->
case whereis(ct_util_server) of
undefined ->
VarFile = variables_file_name(LogDir),
+ io:format("Varfile=~p~n", [VarFile]),
case file:open(VarFile, [write]) of
{ok,Fd} ->
[io:format(Fd, "~p.\n", [Opt]) || Opt <- Opts],
diff --git a/lib/common_test/src/ct_testspec.erl b/lib/common_test/src/ct_testspec.erl
index 169c614955..8a384a1b3a 100644
--- a/lib/common_test/src/ct_testspec.erl
+++ b/lib/common_test/src/ct_testspec.erl
@@ -416,16 +416,17 @@ add_tests([{cover,File}|Ts],Spec) ->
add_tests([{cover,all_nodes,File}|Ts],Spec);
%% --- config ---
+% TODO finish that!
add_tests([{config,all_nodes,Files}|Ts],Spec) ->
- io:format("1: add_tests([{config,all_nodes,~p}|~p],~p~n", [Files, Ts, Spec]),
- Tests = lists:map(fun(N) -> {config,N,{ct_config_plain,Files}} end, list_nodes(Spec)),
+ %io:format("1: add_tests([{config,all_nodes,~p}|~p],~p~n", [Files, Ts, Spec]),
+ Tests = lists:map(fun(N) -> {config,N,{?ct_config_txt,Files}} end, list_nodes(Spec)),
add_tests(Tests++Ts,Spec);
add_tests([{config,Nodes,Files}|Ts],Spec) when is_list(Nodes) ->
- io:format("2: add_tests([{config,~p,~p}|~p],~p) when is_list(Nodes)~n", [Nodes,Files,Spec,Nodes]),
+ %io:format("2: add_tests([{config,~p,~p}|~p],~p) when is_list(Nodes)~n", [Nodes,Files,Spec,Nodes]),
Ts1 = separate(Nodes,config,[Files],Ts,Spec#testspec.nodes),
add_tests(Ts1,Spec);
add_tests([{config,Node,[{Callback,F}|Fs]}|Ts],Spec) when is_list(F) ->
- io:format("3: add_tests([{config,~p,[~p|~p]}|~p],~p) when is_list(~p)~n", [Node, F, Fs, Ts, Spec, F]),
+ %io:format("3: add_tests([{config,~p,[~p|~p]}|~p],~p) when is_list(~p)~n", [Node, F, Fs, Ts, Spec, F]),
Cfgs = Spec#testspec.config,
Node1 = ref2node(Node,Spec#testspec.nodes),
add_tests([{config,Node,Fs}|Ts],
@@ -436,18 +437,19 @@ add_tests([{config,Node,[{Callback,F}|Fs]}|Ts],Spec) when is_list(F) ->
% Spec#testspec{config=[{Node1,{Callback, get_absfile(F,Spec)}}|Cfgs]});
Spec#testspec{config=[{Node1,{Callback,[F]}}|Cfgs]});
add_tests([{config,_Node,[]}|Ts],Spec) ->
- io:format("4: add_tests([{config,_,[]}|~p],~p)~n", [Ts, Spec]),
+ %io:format("4: add_tests([{config,_,[]}|~p],~p)~n", [Ts, Spec]),
add_tests(Ts,Spec);
add_tests([{config,Node,F}|Ts],Spec) ->
- io:format("5: add_tests([{config,~p,~p}|~p],~p)~n", [Node, F, Ts, Spec]),
+ %io:format("5: add_tests([{config,~p,~p}|~p],~p)~n", [Node, F, Ts, Spec]),
add_tests([{config,Node,[F]}|Ts],Spec);
add_tests([{config,Files}|Ts],Spec) ->
- io:format("6: add_tests([{config,~p}|~p],~p)~n", [Files, Ts, Spec]),
+ %io:format("6: add_tests([{config,~p}|~p],~p)~n", [Files, Ts, Spec]),
add_tests([{config,all_nodes,Files}|Ts],Spec);
+% TODO add support for {userconfig, Nodes, {Callback, Files}}
%% --- userconfig ---
add_tests([{userconfig, {Callback, Files}}|Ts], Spec)->
- io:format("add_tests([{userconfig, {~p, ~p}}|~p], ~p)~n", [Callback, Files, Ts, Spec]),
+ %io:format("add_tests([{userconfig, {~p, ~p}}|~p], ~p)~n", [Callback, Files, Ts, Spec]),
Tests = lists:map(fun(N) -> {config,N,{Callback,Files}} end, list_nodes(Spec)),
add_tests(Tests++Ts,Spec);
diff --git a/lib/common_test/src/ct_util.hrl b/lib/common_test/src/ct_util.hrl
index c1dc14f943..fff59f3fde 100644
--- a/lib/common_test/src/ct_util.hrl
+++ b/lib/common_test/src/ct_util.hrl
@@ -50,3 +50,4 @@
-define(CT_MEVMGR_REF, ct_master_event).
-define(missing_suites_info, "missing_suites.info").
+-define(ct_config_txt, ct_config_plain). \ No newline at end of file
diff --git a/lib/common_test/src/vts.erl b/lib/common_test/src/vts.erl
index ad4845a7c3..c94a796ab8 100644
--- a/lib/common_test/src/vts.erl
+++ b/lib/common_test/src/vts.erl
@@ -161,10 +161,12 @@ init(Parent) ->
loop(State) ->
receive
{{init_data,ConfigFiles,EvHandlers,LogDir,Tests},From} ->
- ct_install(State),
+ ct:pal("State#state.current_log_dir=~p", [State#state.current_log_dir]),
+ NewState = State#state{config=ConfigFiles,event_handler=EvHandlers,
+ current_log_dir=LogDir,tests=Tests},
+ ct_install(NewState),
return(From,ok),
- loop(#state{config=ConfigFiles,event_handler=EvHandlers,
- current_log_dir=LogDir,tests=Tests});
+ loop(NewState);
{start_page,From} ->
return(From,start_page1()),
loop(State);