diff options
author | Viacheslav V. Kovalev <kovyl2404@gmail.com> | 2015-06-27 00:28:37 +0300 |
---|---|---|
committer | Viacheslav V. Kovalev <kovyl2404@gmail.com> | 2015-06-27 00:28:37 +0300 |
commit | b2711335aafde6c7bf861a26011568e93667c6d8 (patch) | |
tree | ed1f2dd46c72351824afd98675c5a419a831148c | |
parent | 9a83c35a6fbfcebd1ca92c166efc930fc0f5d4c5 (diff) | |
parent | 93cfa4b0b350656b509918e1506dfdbc0891abdc (diff) |
Merge branch 'Taure-fix-comments' into windows-ct-fix
-rw-r--r-- | src/rebar_file_utils.erl | 4 | ||||
-rw-r--r-- | test/rebar_test_utils.erl | 20 |
2 files changed, 3 insertions, 21 deletions
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl index 735ab49..3fc5698 100644 --- a/src/rebar_file_utils.erl +++ b/src/rebar_file_utils.erl @@ -83,7 +83,7 @@ symlink_or_copy(Source, Target) -> true -> win32_symlink(S, T); false -> - ok + cp_r([S], T) end; _ -> case filelib:is_dir(Target) of @@ -104,7 +104,7 @@ win32_symlink(Source, Target) -> true -> ok; false -> {error, lists:flatten( - io_lib:format("Failed to sumlink ~s to ~s~n", + io_lib:format("Failed to symlink ~s to ~s~n", [Source, Target]))} end. diff --git a/test/rebar_test_utils.erl b/test/rebar_test_utils.erl index 639a293..0c65cb2 100644 --- a/test/rebar_test_utils.erl +++ b/test/rebar_test_utils.erl @@ -215,7 +215,6 @@ check_results(AppDir, Expected) -> ?assertNotEqual(false, lists:keyfind(Name, 1, DepsNames)) ; ({dep, Name, Vsn}) -> ct:pal("Dep Name: ~p, Vsn: ~p", [Name, Vsn]), - ct:pal("DepNames: ~p~n", [DepsNames]), case lists:keyfind(Name, 1, DepsNames) of false -> error({dep_not_found, Name}); @@ -275,28 +274,11 @@ check_results(AppDir, Expected) -> LibDir = filename:join([ReleaseDir, Name, "lib"]), {ok, RelLibs} = file:list_dir(LibDir), - ct:pal("RelLibs: ~p~n", [RelLibs]), IsSymLinkFun = fun(X) -> ec_file:is_symlink(filename:join(LibDir, X)) end, - IsDirFun = - fun(X) -> - filelib:is_dir(filename:join([LibDir, X])) - end, - DevMode = - case os:type() of - {unix, _} -> - lists:all(IsSymLinkFun, RelLibs); - {win32, _} -> - Bool = lists:all(IsDirFun, RelLibs), - case ExpectedDevMode of - true -> - Bool; - false -> - not Bool - end - end, + DevMode = lists:all(IsSymLinkFun, RelLibs), ?assertEqual(ExpectedDevMode, DevMode), %% throws not_found if it doesn't exist |