Skip to content

Commit

Permalink
Move test configurations into test directory. Add hanoidb config and
Browse files Browse the repository at this point in the history
test config as well as Makefile target which runs tests using it.
  • Loading branch information
Gregory Burd committed May 22, 2012
1 parent 0535355 commit 39156d4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ run: erl
${ERL} -s edis

test: erl
${ERL} -config test.config -noshell -sname edis_test_server -s edis -run elog debug &
${ERL} -config test/test.config -noshell -sname edis_test_server -s edis -run elog debug &
mkdir -p ./test/ebin
erlc -o ./test/ebin +debug_info ./test/*_SUITE.erl
rebar skip_deps=true ct ; \
kill `ps aux | grep beam | grep edis_[t]est_server | awk '{print $$2}'`

test-hanoidb:
${ERL} -config test/test-hanoidb.config -noshell -sname edis_test_server -s edis -run elog debug &
mkdir -p ./test/ebin
erlc -o ./test/ebin +debug_info ./test/*_SUITE.erl
rebar skip_deps=true ct ; \
Expand Down
3 changes: 1 addition & 2 deletions hanoidb.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[{edis, [{listener_port_range, {6381, 6381}}, {backend, {edis_hanoidb_backend, [
{sync, {seconds, 10}},
{compress, none},
{block_size, 32768}}
]}}]},
{block_size, 32768}] }}]},
{elog, [{logger, {elogger_console, []}}]},
{sasl, [{errlog_type, all},
{sasl_error_logger, {file, "logs/hanoidb.edis.sasl.log"}}]}].
2 changes: 1 addition & 1 deletion pd.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[{edis, [{listener_port_range, {6381, 6381}}, {backend, {edis_pd_backend, []}}]},
{elog, [{logger, {elogger_console, []}}]},
{sasl, [{errlog_type, all},
{sasl_error_logger, {file, "logs/pd.edis.sasl.log"}}]}].
{sasl_error_logger, {file, "logs/pd.edis.sasl.log"}}]}].
13 changes: 13 additions & 0 deletions test/test-hanoidb.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 ft=erlang et

[{edis, [{listener_port_range, {6381, 6381}}, {backend, {edis_hanoidb_backend, [
{sync, {seconds, 10}},
{compress, none},
{block_size, 32768}] }}
]},
{elog, [{level, debug},
{logger, {elogger_file, [{file, "logs/test-host.log"}, {size_limit, 2000}, {date_break, false}]}}
]},
{sasl, [{errlog_type, all},
{sasl_error_logger, {file, "logs/test-host.sasl.log"}}]}].
4 changes: 2 additions & 2 deletions test.config → test/test.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{edis, [{listener_port_range, {16380, 16380}},
{dir, "db/test"},
{backend, {edis_pd_backend, []}}]},
{dir, "db/test"},
{backend, {edis_pd_backend, []}}]},
{elog, [{level, debug},
{logger, {elogger_file, [{file, "logs/test-host.log"}, {size_limit, 2000}, {date_break, false}]}}
]},
Expand Down

0 comments on commit 39156d4

Please sign in to comment.