aboutsummaryrefslogtreecommitdiffstats
path: root/lib/test_server
diff options
context:
space:
mode:
authorPeter Andersson <peppe@erlang.org>2015-04-15 12:51:48 +0200
committerPeter Andersson <peppe@erlang.org>2015-04-15 13:33:12 +0200
commit1378dee07e847c8af91aef1afc66ad0026a8cefb (patch)
treeec15e8c6e2de8f03a592474db9da0c11ac350782 /lib/test_server
parentdf823580d5030835bbef089d73f833070419d0ff (diff)
downloadotp-1378dee07e847c8af91aef1afc66ad0026a8cefb.tar.gz
otp-1378dee07e847c8af91aef1afc66ad0026a8cefb.tar.bz2
otp-1378dee07e847c8af91aef1afc66ad0026a8cefb.zip
Reintroduce functions for backwards compatibility
Diffstat (limited to 'lib/test_server')
-rw-r--r--lib/test_server/src/ts.erl39
-rw-r--r--lib/test_server/src/ts_lib.erl2
2 files changed, 39 insertions, 2 deletions
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index c2a7afa38b..469593e947 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -33,6 +33,11 @@
cross_cover_analyse/1,
compile_testcases/0, compile_testcases/1,
help/0]).
+
+%% Functions kept for backwards compatibility
+-export([bench/0, bench/1, bench/2, benchmarks/0,
+ smoke_test/0, smoke_test/1,smoke_test/2, smoke_tests/0]).
+
-export([i/0, l/1, r/0, r/1, r/2, r/3]).
%%%----------------------------------------------------------------------
@@ -510,7 +515,7 @@ run_category(TestCategory) when is_atom(TestCategory) ->
%% run_category/2
run_category(TestCategory, Opts) when is_atom(TestCategory),
is_list(Opts) ->
- case ts:tests() of
+ case ts:tests(TestCategory) of
[] ->
{error, no_tests_available};
Apps ->
@@ -529,6 +534,38 @@ run_category(App, TestCategory, Opts) ->
Opts1 = [{test_category,TestCategory} | Opts],
run_some(Apps, Opts1).
+%%-----------------------------------------------------------------
+%% Functions kept for backwards compatibility
+
+bench() ->
+ run_category(bench, []).
+bench(Opts) when is_list(Opts) ->
+ run_category(bench, Opts);
+bench(App) ->
+ run_category(App, bench, []).
+bench(App, Opts) when is_atom(App) ->
+ run_category(App, bench, Opts);
+bench(Apps, Opts) when is_list(Apps) ->
+ run_category(Apps, bench, Opts).
+
+benchmarks() ->
+ tests(bench).
+
+smoke_test() ->
+ run_category(smoke, []).
+smoke_test(Opts) when is_list(Opts) ->
+ run_category(smoke, Opts);
+smoke_test(App) ->
+ run_category(App, smoke, []).
+smoke_test(App, Opts) when is_atom(App) ->
+ run_category(App, smoke, Opts);
+smoke_test(Apps, Opts) when is_list(Apps) ->
+ run_category(Apps, smoke, Opts).
+
+smoke_tests() ->
+ tests(smoke).
+
+%%-----------------------------------------------------------------
is_list_of_suites(List) ->
lists:all(fun(Suite) ->
diff --git a/lib/test_server/src/ts_lib.erl b/lib/test_server/src/ts_lib.erl
index 45746c444d..d27bc55b3a 100644
--- a/lib/test_server/src/ts_lib.erl
+++ b/lib/test_server/src/ts_lib.erl
@@ -98,7 +98,7 @@ specialized_specs(Dir,PostFix) ->
sort_tests([begin
DirPart = filename:dirname(Name),
AppTest = hd(lists:reverse(filename:split(DirPart))),
- string:substr(AppTest, 1, length(AppTest)-5)
+ list_to_atom(string:substr(AppTest, 1, length(AppTest)-5))
end || Name <- Specs]).
specs(Dir) ->