summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-07-13 22:47:56 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-07-13 22:48:20 +0200
commit5a4ddd552492349bdee28ecb4ec39db7520100a9 (patch)
tree56e33a4fe91e7d33b299b7e01230963e646aedde /src
parente1c9d69d1d143655b559ee485ae34a2cf515f20c (diff)
Do not keep eunit config
Diffstat (limited to 'src')
-rw-r--r--src/rebar_eunit.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index 385bb49..2fc4e23 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -64,7 +64,7 @@
%% Public API
%% ===================================================================
-eunit(Config0, _AppFile) ->
+eunit(Config, _AppFile) ->
%% Make sure ?EUNIT_DIR/ and ebin/ directory exists (append dummy module)
ok = filelib:ensure_dir(filename:join(eunit_dir(), "dummy")),
ok = filelib:ensure_dir(filename:join(ebin_dir(), "dummy")),
@@ -85,7 +85,7 @@ eunit(Config0, _AppFile) ->
%% Copy source files to eunit dir for cover in case they are not directly
%% in src but in a subdirectory of src. Cover only looks in cwd and ../src
%% for source files. Also copy files from src_dirs.
- ErlOpts = rebar_utils:erl_opts(Config0),
+ ErlOpts = rebar_utils:erl_opts(Config),
SrcDirs = rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts)),
SrcErls = lists:foldl(
@@ -119,8 +119,8 @@ eunit(Config0, _AppFile) ->
%% Compile erlang code to ?EUNIT_DIR, using a tweaked config
%% with appropriate defines for eunit, and include all the test modules
%% as well.
- Config = eunit_config(Config0),
- rebar_erlc_compiler:doterl_compile(Config, ?EUNIT_DIR, TestErls),
+ ok = rebar_erlc_compiler:doterl_compile(eunit_config(Config),
+ ?EUNIT_DIR, TestErls),
%% Build a list of all the .beams in ?EUNIT_DIR -- use this for
%% cover and eunit testing. Normally you can just tell cover
@@ -166,7 +166,7 @@ eunit(Config0, _AppFile) ->
%% Restore code path
true = code:set_path(CodePath),
- {ok, Config}.
+ ok.
clean(_Config, _File) ->
rebar_file_utils:rm_rf(?EUNIT_DIR).