diff options
author | Andrey Pampukha <[email protected]> | 2010-03-09 15:10:22 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-09 16:19:10 +0200 |
commit | 5b66bed40bd374dfcaa5e5669adf338734d812a3 (patch) | |
tree | ba6d9b2c52da15664d27f43aa2b6b76522e38fd6 /lib/common_test/src/ct_testspec.erl | |
parent | 3c3360947692d8cf55d6dc2290934ec111675cde (diff) | |
download | otp-5b66bed40bd374dfcaa5e5669adf338734d812a3.tar.gz otp-5b66bed40bd374dfcaa5e5669adf338734d812a3.tar.bz2 otp-5b66bed40bd374dfcaa5e5669adf338734d812a3.zip |
Add test suites for configuration
Diffstat (limited to 'lib/common_test/src/ct_testspec.erl')
-rw-r--r-- | lib/common_test/src/ct_testspec.erl | 18 |
1 files changed, 10 insertions, 8 deletions
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); |