diff options
Diffstat (limited to 'test/suite.erl')
-rw-r--r-- | test/suite.erl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/suite.erl b/test/suite.erl index bc094fa31..8000e1d29 100644 --- a/test/suite.erl +++ b/test/suite.erl @@ -65,9 +65,21 @@ init_config(Config) -> {resource, <<"resource">>}, {master_resource, <<"master_resource">>}, {slave_resource, <<"slave_resource">>}, - {password, <<"password">>} + {password, <<"password">>}, + {backends, get_config_backends()} |Config]. +%% Read environment variable CT_DB=riak,mysql to limit the backends to test. +%% You can thus limit the backend you want to test with: +%% CT_BACKENDS=riak,mysql rebar ct suites=ejabberd +get_config_backends() -> + case os:getenv("CT_BACKENDS") of + false -> all; + String -> + Backends0 = string:tokens(String, ","), + lists:map(fun(Backend) -> string:strip(Backend, both, $ ) end, Backends0) + end. + process_config_tpl(Content, []) -> Content; process_config_tpl(Content, [{Name, DefaultValue} | Rest]) -> |