diff options
author | Peter Andersson <[email protected]> | 2014-03-12 16:19:45 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2014-03-12 16:19:45 +0100 |
commit | 7922755473c7ddf5de118e38955c4ad977fe4564 (patch) | |
tree | e7e89b2df28006e0e25118170e8350aa579ff2ab /lib | |
parent | 965d5185d61ce33a8a136b1df42e764e7c95896d (diff) | |
parent | 28e1a64d003a2e4fcdd7da9d3f77d2fc558fa6be (diff) | |
download | otp-7922755473c7ddf5de118e38955c4ad977fe4564.tar.gz otp-7922755473c7ddf5de118e38955c4ad977fe4564.tar.bz2 otp-7922755473c7ddf5de118e38955c4ad977fe4564.zip |
Merge branch 'peppe/test_server/ts_run_args'
* peppe/test_server/ts_run_args:
Add ts:run/5 function to run specific test case(s) in a group
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test_server/src/ts.erl | 12 |
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) -> |