From 6ba96dcf4563b2d1c4433425a182ac086643ed01 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Thu, 7 Jan 2016 15:38:56 -0500 Subject: Avoid changing directories in test suite --- test/rebar_eunit_SUITE.erl | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/rebar_eunit_SUITE.erl b/test/rebar_eunit_SUITE.erl index 1b11c5a..896c624 100644 --- a/test/rebar_eunit_SUITE.erl +++ b/test/rebar_eunit_SUITE.erl @@ -42,13 +42,10 @@ groups() -> init_per_suite(Config) -> PrivDir = ?config(priv_dir, Config), DataDir = ?config(data_dir, Config), - {ok, Cwd} = file:get_cwd(), - file:set_cwd(PrivDir), ok = ec_file:copy(filename:join([DataDir, "basic_app.zip"]), filename:join([PrivDir, "basic_app.zip"])), - {ok, _} = zip:extract(filename:join([PrivDir, "basic_app.zip"])), + {ok, _} = zip:extract(filename:join([PrivDir, "basic_app.zip"]), [{cwd, PrivDir}]), ok = ec_file:copy(filename:join([DataDir, "multi_app.zip"]), filename:join([PrivDir, "multi_app.zip"])), - {ok, _} = zip:extract(filename:join([PrivDir, "multi_app.zip"])), - file:set_cwd(Cwd), + {ok, _} = zip:extract(filename:join([PrivDir, "multi_app.zip"]), [{cwd, PrivDir}]), Config. init_per_group(basic_app, Config) -> @@ -546,4 +543,4 @@ misspecified_eunit_first_files(Config) -> {error, {rebar_prv_eunit, Error}} = rebar_test_utils:run_and_check(State, RebarConfig, ["eunit"], return), - {badconfig, {"Value `~p' of option `~p' must be a list", {some_file, eunit_first_files}}} = Error. \ No newline at end of file + {badconfig, {"Value `~p' of option `~p' must be a list", {some_file, eunit_first_files}}} = Error. -- cgit v1.1