From 701da7b9f2dfb872351b56938f7aed5bff0d79c7 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Mon, 11 Jan 2016 19:50:52 -0600 Subject: remove rlx_topo since all systools >=R15 have a working sort of apps --- src/rlx_release.erl | 9 +-- src/rlx_topo.erl | 219 ---------------------------------------------------- 2 files changed, 1 insertion(+), 227 deletions(-) delete mode 100644 src/rlx_topo.erl diff --git a/src/rlx_release.erl b/src/rlx_release.erl index bf14a9e..2dc6ce0 100644 --- a/src/rlx_release.erl +++ b/src/rlx_release.erl @@ -144,12 +144,7 @@ goals(#release_t{goals=Goals}) -> {ok, t()} | relx:error(). realize(Rel, Pkgs0, World0) -> World1 = subset_world(Pkgs0, World0), - case rlx_topo:sort_apps(World1) of - {ok, Pkgs1} -> - process_specs(realize_erts(Rel), Pkgs1); - Error={error, _} -> - Error - end. + process_specs(realize_erts(Rel), World1). %% @doc this gives the application specs for the release. This can only be %% populated by the 'realize' call in this module. @@ -244,8 +239,6 @@ format_goal(Constraint) -> rlx_depsolver:format_constraint(Constraint). -spec format_error(Reason::term()) -> iolist(). -format_error({topo_error, E}) -> - rlx_topo:format_error(E); format_error({failed_to_parse, Con}) -> io_lib:format("Failed to parse constraint ~p", [Con]); format_error({invalid_constraint, _, Con}) -> diff --git a/src/rlx_topo.erl b/src/rlx_topo.erl deleted file mode 100644 index a07a4a7..0000000 --- a/src/rlx_topo.erl +++ /dev/null @@ -1,219 +0,0 @@ -%% -*- erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*- -%%% Copyright 2012 Erlware, LLC. All Rights Reserved. -%%% -%%% This file is provided to you under the Apache License, -%%% Version 2.0 (the "License"); you may not use this file -%%% except in compliance with the License. You may obtain -%%% a copy of the License at -%%% -%%% http://www.apache.org/licenses/LICENSE-2.0 -%%% -%%% Unless required by applicable law or agreed to in writing, -%%% software distributed under the License is distributed on an -%%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -%%% KIND, either express or implied. See the License for the -%%% specific language governing permissions and limitations -%%% under the License. -%%%------------------------------------------------------------------- -%%% @author Joe Armstrong -%%% @author Eric Merritt -%%% @doc -%%% This is a pretty simple topological sort for erlang. It was -%%% originally written for ermake by Joe Armstrong back in '98. It -%%% has been pretty heavily modified by Eric Merritt since '06 and modified again for Relx. -%%% -%%% A partial order on the set S is a set of pairs {Xi,Xj} such that -%%% some relation between Xi and Xj is obeyed. -%%% -%%% A topological sort of a partial order is a sequence of elements -%%% [X1, X2, X3 ...] such that if whenever {Xi, Xj} is in the partial -%%% order i < j -%%% @end -%%%------------------------------------------------------------------- --module(rlx_topo). - --export([sort/1, - sort_apps/1, - format_error/1]). - --include("relx.hrl"). - -%%==================================================================== -%% Types -%%==================================================================== --type pair() :: {DependentApp::atom(), PrimaryApp::atom()}. --type name() :: AppName::atom(). --type element() :: name() | pair(). - -%%==================================================================== -%% API -%%==================================================================== - -%% @doc This only does a topo sort on the list of applications and -%% assumes that there is only *one* version of each app in the list of -%% applications. This implies that you have already done the -%% constraint solve before you pass the list of apps here to be -%% sorted. --spec sort_apps([rlx_app_info:t()]) -> - {ok, [rlx_app_info:t()]} | - relx:error(). -sort_apps(Apps) -> - Pairs = apps_to_pairs(Apps), - case sort(Pairs) of - {ok, Names} -> - {ok, names_to_apps(Names, Apps)}; - E -> - E - end. - -%% @doc Do a topological sort on the list of pairs. --spec sort([pair()]) -> {ok, [atom()]} | relx:error(). -sort(Pairs) -> - iterate(Pairs, [], all(Pairs)). - -%% @doc nicely format the error from the sort. --spec format_error(Reason::term()) -> iolist(). -format_error({cycle, Pairs}) -> - ["Cycle detected in dependency graph, this must be resolved " - "before we can continue:\n", - case Pairs of - [{P1, P2}] -> - [rlx_util:indent(2), erlang:atom_to_list(P2), "->", erlang:atom_to_list(P1)]; - [{P1, P2} | Rest] -> - [rlx_util:indent(2), erlang:atom_to_list(P2), "->", erlang:atom_to_list(P1), - [["-> ", erlang:atom_to_list(PP2), " -> ", erlang:atom_to_list(PP1)] || {PP1, PP2} <- Rest]]; - [] -> - [] - end]. - -%%==================================================================== -%% Internal Functions -%%==================================================================== --spec names_to_apps([atom()], [rlx_app_info:t()]) -> [rlx_app_info:t()]. -names_to_apps(Names, Apps) -> - [find_app_by_name(Name, Apps) || Name <- Names]. - --spec find_app_by_name(atom(), [rlx_app_info:t()]) -> rlx_app_info:t(). -find_app_by_name(Name, Apps) -> - {ok, App1} = - ec_lists:find(fun(App) -> - rlx_app_info:name(App) =:= Name - end, Apps), - App1. - --spec apps_to_pairs([rlx_app_info:t()]) -> [pair()]. -apps_to_pairs(Apps) -> - lists:flatten([app_to_pairs(App) || App <- Apps]). - --spec app_to_pairs(rlx_app_info:t()) -> [pair()]. -app_to_pairs(App) -> - [{DepApp, rlx_app_info:name(App)} || - DepApp <- - rlx_app_info:active_deps(App) ++ - rlx_app_info:library_deps(App)]. - - -%% @doc Iterate over the system. @private --spec iterate([pair()], [name()], [name()]) -> - {ok, [name()]} | relx:error(). -iterate([], L, All) -> - {ok, remove_duplicates(L ++ subtract(All, L))}; -iterate(Pairs, L, All) -> - case subtract(lhs(Pairs), rhs(Pairs)) of - [] -> - ?RLX_ERROR({cycle, Pairs}); - Lhs -> - iterate(remove_pairs(Lhs, Pairs), L ++ Lhs, All) - end. - --spec all([pair()]) -> [atom()]. -all(L) -> - lhs(L) ++ rhs(L). - --spec lhs([pair()]) -> [atom()]. -lhs(L) -> - [X || {X, _} <- L]. - --spec rhs([pair()]) -> [atom()]. -rhs(L) -> - [Y || {_, Y} <- L]. - -%% @doc all the elements in L1 which are not in L2 -%% @private --spec subtract([element()], [element()]) -> [element()]. -subtract(L1, L2) -> - [X || X <- L1, not lists:member(X, L2)]. - -%% @doc remove dups from the list. @private --spec remove_duplicates([element()]) -> [element()]. -remove_duplicates([H|T]) -> - case lists:member(H, T) of - true -> - remove_duplicates(T); - false -> - [H|remove_duplicates(T)] - end; -remove_duplicates([]) -> - []. - -%% @doc -%% removes all pairs from L2 where the first element -%% of each pair is a member of L1 -%% -%% L2' L1 = [X] L2 = [{X,Y}]. -%% @private --spec remove_pairs([atom()], [pair()]) -> [pair()]. -remove_pairs(L1, L2) -> - [All || All={X, _Y} <- L2, not lists:member(X, L1)]. - -%%==================================================================== -%% Tests -%%==================================================================== --ifdef(TEST). --include_lib("eunit/include/eunit.hrl"). - -topo_1_test() -> - Pairs = [{one,two},{two,four},{four,six}, - {two,ten},{four,eight}, - {six,three},{one,three}, - {three,five},{five,eight}, - {seven,five},{seven,nine}, - {nine,four},{nine,ten}], - ?assertMatch({ok, [one,seven,two,nine,four,six,three,five,eight,ten]}, - sort(Pairs)). -topo_2_test() -> - Pairs = [{app2, app1}, {zapp1, app1}, {stdlib, app1}, - {app3, app2}, {kernel, app1}, {kernel, app3}, - {app2, zapp1}, {app3, zapp1}, {zapp2, zapp1}], - ?assertMatch({ok, [stdlib, kernel, zapp2, - app3, app2, zapp1, app1]}, - sort(Pairs)). - -topo_pairs_cycle_test() -> - Pairs = [{app2, app1}, {app1, app2}, {stdlib, app1}], - ?assertMatch({error, {_, {cycle, [{app2, app1}, {app1, app2}]}}}, - sort(Pairs)). - -topo_apps_cycle_test() -> - {ok, App1} = rlx_app_info:new(app1, "0.1", "/no-dir", [app2], [stdlib]), - {ok, App2} = rlx_app_info:new(app2, "0.1", "/no-dir", [app1], []), - Apps = [App1, App2], - ?assertMatch({error, {_, {cycle, [{app2,app1},{app1,app2}]}}}, - sort_apps(Apps)). - -topo_apps_good_test() -> - Apps = [App || - {ok, App} <- - [rlx_app_info:new(app1, "0.1", "/no-dir", [app2, zapp1], [stdlib, kernel]), - rlx_app_info:new(app2, "0.1", "/no-dir", [app3], []), - rlx_app_info:new(app3, "0.1", "/no-dir", [kernel], []), - rlx_app_info:new(zapp1, "0.1", "/no-dir", [app2,app3,zapp2], []), - rlx_app_info:new(stdlib, "0.1", "/no-dir", [], []), - rlx_app_info:new(kernel, "0.1", "/no-dir", [], []), - rlx_app_info:new(zapp2, "0.1", "/no-dir", [], [])]], - {ok, Sorted} = sort_apps(Apps), - ?assertMatch([stdlib, kernel, zapp2, - app3, app2, zapp1, app1], - [rlx_app_info:name(App) || App <- Sorted]). - --endif. -- cgit v1.2.3 From d9f60a62c0d0cb34d4f0d8671e7e6c510a0548c5 Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Mon, 11 Jan 2016 19:51:27 -0600 Subject: use priv_dir for generated test data --- test/rlx_archive_SUITE.erl | 10 ++++----- test/rlx_command_SUITE.erl | 6 +++--- test/rlx_discover_SUITE.erl | 2 +- test/rlx_release_SUITE.erl | 50 ++++++++++++++++++++++----------------------- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/test/rlx_archive_SUITE.erl b/test/rlx_archive_SUITE.erl index 0f972b0..2373fa0 100644 --- a/test/rlx_archive_SUITE.erl +++ b/test/rlx_archive_SUITE.erl @@ -26,7 +26,7 @@ end_per_suite(_Config) -> ok. init_per_testcase(_, Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), LibDir1 = filename:join([DataDir, rlx_test_utils:create_random_name("lib_dir1_")]), ok = rlx_util:mkdir_p(LibDir1), State = rlx_state:new([], [{lib_dirs, [LibDir1]}], [release]), @@ -58,7 +58,7 @@ basic_tar(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do([{relname, foo}, {relvsn, "0.0.1"}, @@ -105,7 +105,7 @@ exclude_erts(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do([{relname, foo}, {relvsn, "0.0.1"}, @@ -155,7 +155,7 @@ exclude_src(Config) -> [goal_app_1, goal_app_2]}, {include_src, false}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do([{relname, foo}, {relvsn, "0.0.1"}, @@ -202,7 +202,7 @@ include_src(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do([{relname, foo}, {relvsn, "0.0.1"}, diff --git a/test/rlx_command_SUITE.erl b/test/rlx_command_SUITE.erl index 32efc1e..e0beec1 100644 --- a/test/rlx_command_SUITE.erl +++ b/test/rlx_command_SUITE.erl @@ -45,7 +45,7 @@ all() -> [normal_passing_case, lib_expansion_case, lib_fail_case, config_fail_case]. normal_passing_case(Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), Lib1 = filename:join([DataDir, <<"lib1">>]), Lib2 = filename:join([DataDir, <<"lib2">>]), Outdir = filename:join([DataDir, "outdir"]), @@ -74,7 +74,7 @@ normal_passing_case(Config) -> rlx_state:goals(State1)). lib_expansion_case(Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), Lib1 = filename:join(DataDir, <<"lib1">>), Lib2 = filename:join(DataDir, <<"lib2">>), ok = rlx_util:mkdir_p(Lib1), @@ -88,7 +88,7 @@ lib_expansion_case(Config) -> rlx_state:lib_dirs(State1)). lib_fail_case(Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), Lib1 = filename:join([DataDir, "lib1"]), Lib2 = filename:join([DataDir, "lib3333"]), ok = rlx_util:mkdir_p(Lib1), diff --git a/test/rlx_discover_SUITE.erl b/test/rlx_discover_SUITE.erl index 2a8933c..77bdf65 100644 --- a/test/rlx_discover_SUITE.erl +++ b/test/rlx_discover_SUITE.erl @@ -43,7 +43,7 @@ end_per_suite(_Config) -> ok. init_per_testcase(_, Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), LibDir1 = filename:join([DataDir, create_random_name("lib_dir1_")]), LibDir2 = filename:join([DataDir, create_random_name("lib_dir2_")]), ok = rlx_util:mkdir_p(LibDir1), diff --git a/test/rlx_release_SUITE.erl b/test/rlx_release_SUITE.erl index f8252b5..d4669f7 100644 --- a/test/rlx_release_SUITE.erl +++ b/test/rlx_release_SUITE.erl @@ -61,7 +61,7 @@ end_per_suite(_Config) -> ok. init_per_testcase(_, Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = filename:join(proplists:get_value(priv_dir, Config), ?MODULE), LibDir1 = filename:join([DataDir, rlx_test_utils:create_random_name("lib_dir1_")]), ok = rlx_util:mkdir_p(LibDir1), State = rlx_state:new([], [{lib_dirs, [LibDir1]}], [release]), @@ -102,7 +102,7 @@ add_providers(Config) -> [goal_app_1, goal_app_2]}, {add_providers, [rlx_prv_app_discover]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), @@ -141,7 +141,7 @@ make_release(Config) -> {release, {foo, "0.0.2"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), @@ -172,7 +172,7 @@ make_extend_release(Config) -> {release, {foo_test, "0.0.1", {extend, foo}}, [goal_app_2]}, {lib_dirs, [filename:join(LibDir1, "*")]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), ?assertMatch({error, {rlx_prv_release, {multiple_release_names,foo_test,foo}}}, @@ -204,7 +204,7 @@ make_invalid_config_release(Config) -> "{release, {foo, \"0.0.1\"}, [goal_app_1, goal_app_2,]}"), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {error, {rlx_config, {consult, _, _}}} = relx:do(undefined, undefined, [], [LibDir1], 3, @@ -225,7 +225,7 @@ make_scriptless_release(Config) -> {release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), @@ -244,7 +244,7 @@ make_scriptless_release(Config) -> ?assert(lists:member({lib_dep_1, "0.0.1", load}, AppSpecs)). make_overridden_release(Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = proplists:get_value(priv_dir, Config), OverrideDir1 = filename:join([DataDir, rlx_test_utils:create_random_name("override_dir_")]), LibDir1 = proplists:get_value(lib1, Config), @@ -267,7 +267,7 @@ make_overridden_release(Config) -> [goal_app_1, erlang:list_to_atom(OverrideApp), goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, Cwd} = file:get_cwd(), {ok, State} = relx:do(Cwd, undefined, undefined, [], [LibDir1], 3, @@ -307,7 +307,7 @@ make_skip_app_release(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1]}, {skip_apps, [goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, Cwd} = file:get_cwd(), {ok, State} = relx:do(Cwd, undefined, undefined, [], [LibDir1], 3, @@ -336,7 +336,7 @@ make_exclude_app_release(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1]}, {exclude_apps, [non_goal_1]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, Cwd} = file:get_cwd(), {ok, State} = relx:do(Cwd, undefined, undefined, [], [LibDir1], 3, @@ -351,7 +351,7 @@ make_exclude_app_release(Config) -> ?assert(lists:member({goal_app_1, "0.0.1"}, AppSpecs)). make_auto_skip_empty_app_release(Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = proplists:get_value(priv_dir, Config), EmptyAppDir1 = filename:join([DataDir, rlx_test_utils:create_random_name("skip_app_dir_")]), LibDir1 = proplists:get_value(lib1, Config), @@ -372,7 +372,7 @@ make_auto_skip_empty_app_release(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, Cwd} = file:get_cwd(), {ok, State} = relx:do(Cwd, undefined, undefined, [], [LibDir1], 3, @@ -403,7 +403,7 @@ make_app_type_none_release(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, {goal_app_2, none}]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, Cwd} = file:get_cwd(), {ok, State} = relx:do(Cwd, undefined, undefined, [], [LibDir1], 3, @@ -435,7 +435,7 @@ make_implicit_config_release(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), ok = file:set_cwd(FooRoot), {ok, FooRoot} = file:get_cwd(), @@ -453,7 +453,7 @@ make_implicit_config_release(Config) -> ?assert(lists:member({lib_dep_1, "0.0.1", load}, AppSpecs)). make_rerun_overridden_release(Config) -> - DataDir = proplists:get_value(data_dir, Config), + DataDir = proplists:get_value(priv_dir, Config), OverrideDir1 = filename:join([DataDir, rlx_test_utils:create_random_name("override_dir_")]), LibDir1 = proplists:get_value(lib1, Config), @@ -479,7 +479,7 @@ make_rerun_overridden_release(Config) -> erlang:list_to_atom(OverrideApp), goal_app_2]}, {overlay_vars, [OverlayVars]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, Cwd} = file:get_cwd(), {ok, _} = relx:do(Cwd, undefined, undefined, [], [LibDir1], 3, @@ -569,7 +569,7 @@ overlay_release(Config) -> {ok, FileInfo} = file:read_file_info(TemplateFile), ok = file:write_file_info(TemplateFile, FileInfo#file_info{mode=8#00777}), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, @@ -626,7 +626,7 @@ make_goalless_release(Config) -> rlx_test_utils:write_config(ConfigFile, [{release, {foo, "0.0.1"}, []}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), ?assertMatch({error,{rlx_prv_release,no_goals_specified}}, relx:do(undefined, undefined, [], [LibDir1], 3, @@ -645,7 +645,7 @@ make_depfree_release(Config) -> rlx_test_utils:write_config(ConfigFile, [{release, {foo, "0.0.1"}, [goal_app_1]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), @@ -684,7 +684,7 @@ make_relup_release(Config) -> [sasl, {goal_app_1, "0.0.3"}, {goal_app_2, "0.0.3"}]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, _} = relx:do(foo, "0.0.1", [], [LibDir1], 3, OutputDir, ConfigFile), @@ -764,7 +764,7 @@ make_relup_release2(Config) -> [sasl, {goal_app_1, "0.0.3"}, {goal_app_2, "0.0.3"}]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, _} = relx:do(foo, "0.0.1", [], [LibDir1], 3, OutputDir, ConfigFile), @@ -854,7 +854,7 @@ make_dev_mode_release(Config) -> {release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), @@ -909,7 +909,7 @@ make_config_script_release(Config) -> " _ -> CONFIG % env var not defined or anything other than true\n" "end.\n"), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), ok = file:set_cwd(FooRoot), {ok, FooRoot} = file:get_cwd(), @@ -952,7 +952,7 @@ make_release_twice(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), @@ -1004,7 +1004,7 @@ make_release_twice_dev_mode(Config) -> [{release, {foo, "0.0.1"}, [goal_app_1, goal_app_2]}, {dev_mode, true}]), - OutputDir = filename:join([proplists:get_value(data_dir, Config), + OutputDir = filename:join([proplists:get_value(priv_dir, Config), rlx_test_utils:create_random_name("relx-output")]), {ok, State} = relx:do(undefined, undefined, [], [LibDir1], 3, OutputDir, ConfigFile), -- cgit v1.2.3