diff options
| author | Francisco Rojas <frojas@groupon.com> | 2016-04-06 21:16:25 -0700 |
|---|---|---|
| committer | Francisco Rojas <frojas@groupon.com> | 2016-04-06 21:16:25 -0700 |
| commit | 243e94391a4ac446cfe0c814750abfb014db9ac4 (patch) | |
| tree | 5c0f9fc9ea5408bc4c8b0a0359c2e646e6ad80ee /test | |
| parent | 2d1d251add285c6296e0ce1c12e2a9a961c2209b (diff) | |
Read env var REBAR_CACHE_DIR on rebar3 only once
Instead of reading every time that rebar_dir:global_cache_dir/1 is
called
Diffstat (limited to 'test')
| -rw-r--r-- | test/rebar_dir_SUITE.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rebar_dir_SUITE.erl b/test/rebar_dir_SUITE.erl index f287d5f..9734830 100644 --- a/test/rebar_dir_SUITE.erl +++ b/test/rebar_dir_SUITE.erl @@ -25,6 +25,7 @@ init_per_testcase(default_global_cache_dir, Config) -> ,{root_dir, AppsDir}]), [{apps, AppsDir}, {checkouts, CheckoutsDir}, {state, NewState} | Config]; init_per_testcase(overwrite_default_global_cache_dir, Config) -> + os:putenv("REBAR_CACHE_DIR", ?config(priv_dir, Config)), [{apps, AppsDir}, {checkouts, CheckoutsDir}, {state, _State} | Config] = rebar_test_utils:init_rebar_state(Config), NewState = rebar_state:new([{base_dir, filename:join([AppsDir, "_build"])} ,{root_dir, AppsDir}]), @@ -189,7 +190,6 @@ default_global_cache_dir(Config) -> ?assertEqual(Expected, rebar_dir:global_cache_dir(rebar_state:opts(State))). overwrite_default_global_cache_dir(Config) -> - os:putenv("REBAR_CACHE_DIR", ?config(priv_dir, Config)), RebarConfig = [{erl_opts, []}], {ok, State} = rebar_test_utils:run_and_check(Config, RebarConfig, ["compile"], return), Expected = ?config(priv_dir, Config), |
