diff options
Diffstat (limited to 'test/rebar_test_utils.erl')
-rw-r--r-- | test/rebar_test_utils.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/rebar_test_utils.erl b/test/rebar_test_utils.erl index 7c52a18..c035b91 100644 --- a/test/rebar_test_utils.erl +++ b/test/rebar_test_utils.erl @@ -217,7 +217,7 @@ check_results(AppDir, Expected) -> ?assertEqual(iolist_to_binary(Vsn), iolist_to_binary(LockVsn)) end - ; ({release, Name, Vsn}) -> + ; ({release, Name, Vsn, ExpectedDevMode}) -> ct:pal("Release: ~p-~s", [Name, Vsn]), {ok, Cwd} = file:get_cwd(), try @@ -228,6 +228,15 @@ check_results(AppDir, Expected) -> {ok, RelxState2} = rlx_prv_app_discover:do(RelxState1), {ok, RelxState3} = rlx_prv_rel_discover:do(RelxState2), + LibDir = filename:join([ReleaseDir, Name, "lib"]), + {ok, RelLibs} = file:list_dir(LibDir), + IsSymLinkFun = + fun(X) -> + ec_file:is_symlink(filename:join(LibDir, X)) + end, + DevMode = lists:all(IsSymLinkFun, RelLibs), + ?assertEqual(ExpectedDevMode, DevMode), + %% throws not_found if it doesn't exist rlx_state:get_realized_release(RelxState3, Name, Vsn) catch |