aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server/src
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-03-07 15:14:12 +0100
committerPeter Andersson <[email protected]>2014-03-12 16:11:49 +0100
commit28e1a64d003a2e4fcdd7da9d3f77d2fc558fa6be (patch)
treee7e89b2df28006e0e25118170e8350aa579ff2ab /lib/test_server/src
parent965d5185d61ce33a8a136b1df42e764e7c95896d (diff)
downloadotp-28e1a64d003a2e4fcdd7da9d3f77d2fc558fa6be.tar.gz
otp-28e1a64d003a2e4fcdd7da9d3f77d2fc558fa6be.tar.bz2
otp-28e1a64d003a2e4fcdd7da9d3f77d2fc558fa6be.zip
Add ts:run/5 function to run specific test case(s) in a group
Diffstat (limited to 'lib/test_server/src')
-rw-r--r--lib/test_server/src/ts.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index 11d6f7af4d..bc7d244c7c 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -24,7 +24,7 @@
-module(ts).
--export([run/0, run/1, run/2, run/3, run/4,
+-export([run/0, run/1, run/2, run/3, run/4, run/5,
tests/0, tests/1,
install/0, install/1,
bench/0, bench/1, bench/2, benchmarks/0,
@@ -389,6 +389,16 @@ run(Testspec, Mod, Grs={group,_Groups}, Config) when is_atom(Testspec),
Args = [{suite,Mod},Grs],
run_test(atom_to_list(Testspec), Args, Options).
+%% run/5
+%% Run one or more test cases in a group with Options.
+run(Testspec, Mod, Group, Cases, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Config) ->
+ Group1 = if is_tuple(Group) -> Group; true -> {group,Group} end,
+ Cases1 = if is_tuple(Cases) -> Cases; true -> {testcase,Cases} end,
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Group1,Cases1],
+ run_test(atom_to_list(Testspec), Args, Options).
is_list_of_suites(List) ->
lists:all(fun(Suite) ->