aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_run.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2010-06-04 11:21:41 +0200
committerRaimo Niskanen <[email protected]>2010-06-09 16:19:22 +0200
commit7ce6aa16313d159b1994bf1d2f18b52bd91e9075 (patch)
tree01bcfc8f361444bfd501f9da82b1263b8e6c87e7 /lib/common_test/src/ct_run.erl
parent13fab1dd93fba14e55fea0a343650dbaa54e8725 (diff)
downloadotp-7ce6aa16313d159b1994bf1d2f18b52bd91e9075.tar.gz
otp-7ce6aa16313d159b1994bf1d2f18b52bd91e9075.tar.bz2
otp-7ce6aa16313d159b1994bf1d2f18b52bd91e9075.zip
Add groups in test specifications
Ongoing work...
Diffstat (limited to 'lib/common_test/src/ct_run.erl')
-rw-r--r--lib/common_test/src/ct_run.erl22
1 files changed, 16 insertions, 6 deletions
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index 7037ac7c1e..0d4a5b31dc 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -510,10 +510,6 @@ install(Opts, LogDir) ->
case whereis(ct_util_server) of
undefined ->
VarFile = variables_file_name(LogDir),
-
- %%! --- Tue Jun 1 00:20:33 2010 --- peppe was here!
- io:format("Varfile = ~p~n", [VarFile]),
-
case file:open(VarFile, [write]) of
{ok,Fd} ->
[io:format(Fd, "~p.\n", [Opt]) || Opt <- Opts],
@@ -1535,13 +1531,27 @@ add_jobs([{TestDir,Suite,all}|Tests], Skip, Opts, CleanUp) ->
Error ->
Error
end;
+
+%% group
+add_jobs([{TestDir,Suite,[{GroupName,_Cases}]}|Tests], Skip, Opts, CleanUp) when
+ is_atom(GroupName) ->
+ add_jobs([{TestDir,Suite,GroupName}|Tests], Skip, Opts, CleanUp);
+add_jobs([{TestDir,Suite,{GroupName,_Cases}}|Tests], Skip, Opts, CleanUp) when
+ is_atom(GroupName) ->
+ add_jobs([{TestDir,Suite,GroupName}|Tests], Skip, Opts, CleanUp);
+
+%% test case
add_jobs([{TestDir,Suite,[Case]}|Tests], Skip, Opts, CleanUp) when is_atom(Case) ->
add_jobs([{TestDir,Suite,Case}|Tests], Skip, Opts, CleanUp);
+
add_jobs([{TestDir,Suite,Cases}|Tests], Skip, Opts, CleanUp) when is_list(Cases) ->
- case maybe_interpret(Suite, Cases, Opts) of
+ Cases1 = lists:map(fun({GroupName,_}) when is_atom(GroupName) -> GroupName;
+ (Case) -> Case
+ end, Cases),
+ case maybe_interpret(Suite, Cases1, Opts) of
ok ->
Name = get_name(TestDir) ++ "." ++ atom_to_list(Suite) ++ ".cases",
- case catch test_server_ctrl:add_cases_with_skip(Name, Suite, Cases,
+ case catch test_server_ctrl:add_cases_with_skip(Name, Suite, Cases1,
skiplist(TestDir,Skip)) of
{'EXIT',_} ->
CleanUp;