diff options
author | Eric <[email protected]> | 2012-09-18 10:04:52 -0700 |
---|---|---|
committer | Eric <[email protected]> | 2012-09-18 10:04:52 -0700 |
commit | cbf20abdcb99009d9b93e34f93a9a2c55acbf958 (patch) | |
tree | 6497d1754749fb8b918a57a66ef5de6096753e2c /test | |
parent | 085b1e92b2a2d442d76490e41f8d697a6ec704a9 (diff) | |
download | relx-cbf20abdcb99009d9b93e34f93a9a2c55acbf958.tar.gz relx-cbf20abdcb99009d9b93e34f93a9a2c55acbf958.tar.bz2 relx-cbf20abdcb99009d9b93e34f93a9a2c55acbf958.zip |
rcl_app_info must support comparible versions
This changes moves rcl_app_info to store the version as a parsed
semver rather then a string, making it comparable.
tmp app info
Diffstat (limited to 'test')
-rw-r--r-- | test/rclt_discover_SUITE.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/test/rclt_discover_SUITE.erl b/test/rclt_discover_SUITE.erl index dca683a..0929e4a 100644 --- a/test/rclt_discover_SUITE.erl +++ b/test/rclt_discover_SUITE.erl @@ -58,7 +58,7 @@ all() -> normal_case(Config) -> LibDir1 = proplists:get_value(lib1, Config), Apps1 = [(fun({Name, Vsn}) -> - create_app(LibDir1, Name, Vsn) + create_app(LibDir1, Name, Vsn) end)(App) || App <- @@ -113,7 +113,6 @@ no_beam_case(Config) -> State0 = proplists:get_value(state, Config), {DiscoverProvider, {ok, State1}} = rcl_provider:new(rcl_prv_discover, State0), EbinDir = filename:join([LibDir2, BadName, "ebin"]), - %% Ignore apps that do not contain any beam files ?assertMatch({error, [{no_beam_files, EbinDir}]}, rcl_provider:do(DiscoverProvider, State1)). @@ -145,20 +144,20 @@ bad_ebin_case(Config) -> State0 = proplists:get_value(state, Config), {DiscoverProvider, {ok, State1}} = rcl_provider:new(rcl_prv_discover, State0), - %% Ignore apps that do not contain any beam files ?assertMatch({error, [{invalid_app_file, Filename}]}, rcl_provider:do(DiscoverProvider, State1)). - -%%% API +%%%=================================================================== +%%% Helper functions %%%=================================================================== create_app(Dir, Name, Vsn) -> AppDir = filename:join([Dir, Name]), write_app_file(AppDir, Name, Vsn), write_beam_file(AppDir, Name), - rcl_app_info:new(erlang:list_to_atom(Name), Vsn, AppDir, - [kernel, stdlib], []). + {ok, App} = rcl_app_info:new(erlang:list_to_atom(Name), Vsn, AppDir, + [kernel, stdlib], []), + App. write_beam_file(Dir, Name) -> Beam = filename:join([Dir, "ebin", "not_a_real_beam" ++ Name ++ ".beam"]), |