summaryrefslogtreecommitdiff
path: root/src/rebar_prv_common_test.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r--src/rebar_prv_common_test.erl12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index 72cb0b0..9e17f38 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -182,19 +182,11 @@ split_ct_dirs(State, RawOpts) ->
{InDirs, OutDir}.
default_test_dir(State) ->
- Tmp = case erlang:system_info(system_architecture) of
- "win32" ->
- "./tmp";
- _SysArch ->
- "/tmp"
- end,
+ Tmp = rebar_file_utils:system_tmpdir(),
Root = filename:join([rebar_state:dir(State), Tmp]),
Project = filename:basename(rebar_state:dir(State)),
OutDir = filename:join([Root, Project ++ "_rebar3_ct"]),
- %% delete the directory if it exists so tests run with clean state
- _ = ec_file:remove(OutDir, [recursive]),
- %% recreate the directory
- ok = filelib:ensure_dir(filename:join([OutDir, "dummy.beam"])),
+ ok = rebar_file_utils:reset_dir(OutDir),
OutDir.
transform_opts(Opts) ->