diff options
-rw-r--r-- | rel/files/eunit.ini | 4 | ||||
-rw-r--r-- | rel/plugins/eunit_plugin.erl | 4 | ||||
-rw-r--r-- | setup_eunit.template | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/rel/files/eunit.ini b/rel/files/eunit.ini index 361ea6669..8c203bab4 100644 --- a/rel/files/eunit.ini +++ b/rel/files/eunit.ini @@ -30,9 +30,9 @@ port = 0 [log] ; log to a file to save our terminals from log spam writer = file -file = couch.log +file = {{log_dir}}/couch.log level = info [replicator] ; disable jitter to reduce test run times -startup_jitter = 0
\ No newline at end of file +startup_jitter = 0 diff --git a/rel/plugins/eunit_plugin.erl b/rel/plugins/eunit_plugin.erl index 8f298db5f..356f4e0f7 100644 --- a/rel/plugins/eunit_plugin.erl +++ b/rel/plugins/eunit_plugin.erl @@ -31,12 +31,14 @@ build_eunit_config(Config0, AppFile) -> ViewIndexDir = Cwd ++ "/tmp/data", StateDir = Cwd ++ "/tmp/data", TmpDataDir = Cwd ++ "/tmp/tmp_data", + LogDir = Cwd ++ "/tmp", cleanup_dirs([DataDir, TmpDataDir]), Config1 = rebar_config:set_global(Config0, template, "setup_eunit"), Config2 = rebar_config:set_global(Config1, prefix, Cwd), Config3 = rebar_config:set_global(Config2, data_dir, DataDir), Config4 = rebar_config:set_global(Config3, view_index_dir, ViewIndexDir), - Config = rebar_config:set_global(Config4, state_dir, StateDir), + Config5 = rebar_config:set_global(Config4, log_dir, LogDir), + Config = rebar_config:set_global(Config5, state_dir, StateDir), rebar_templater:create(Config, AppFile). cleanup_dirs(Dirs) -> diff --git a/setup_eunit.template b/setup_eunit.template index ceef60d12..11eee4458 100644 --- a/setup_eunit.template +++ b/setup_eunit.template @@ -8,7 +8,8 @@ {data_dir, "/tmp"}, {prefix, "/tmp"}, {view_index_dir, "/tmp"}, - {state_dir, "/tmp"} + {state_dir, "/tmp"}, + {log_dir, "/tmp"} ]}. {dir, "tmp"}. {dir, "tmp/etc"}. |