Fixed mapred_verify test escript/priv issues

This commit is contained in:
Joe DeVivo 2012-10-31 13:23:38 -07:00
parent 10d2db1d25
commit f3e0420a63
2 changed files with 11 additions and 2 deletions

View File

@ -17,7 +17,7 @@
{kvc, "1.2.1", {git, "https://github.com/etrepum/kvc", {tag, "v1.2.1"}}} {kvc, "1.2.1", {git, "https://github.com/etrepum/kvc", {tag, "v1.2.1"}}}
]}. ]}.
{escript_incl_apps, [lager, getopt, riakhttpc, riakc, ibrowse, mochiweb, kvc, mapred_verify]}. {escript_incl_apps, [lager, getopt, riakhttpc, riakc, ibrowse, mochiweb, kvc]}.
{plugin_dir, "src"}. {plugin_dir, "src"}.
{plugins, [rebar_riak_test_plugin]}. {plugins, [rebar_riak_test_plugin]}.

View File

@ -30,7 +30,16 @@ confirm() ->
lager:info("Build ~b node cluster", [?NODE_COUNT]), lager:info("Build ~b node cluster", [?NODE_COUNT]),
Nodes = rt:build_cluster(?NODE_COUNT), Nodes = rt:build_cluster(?NODE_COUNT),
PrivDir = code:priv_dir(mapred_verify),
%% @todo longer term fix is probably one or more of:
%% 1) add a mapred_veryify section to riak_test.config
%% 2) learn to use this "inclextra" bit of rebar to package tests.def
%% in the escript: https://github.com/basho/rebar/blob/master/src/rebar_escripter.erl#L57
PrivDir = case code:priv_dir(mapred_verify) of
{error, bad_name} ->
erlang:error("Could not determine priv dir for mapred_verify. Make sure that your riak_test.config contains \"deps\"");
PD -> PD
end,
MRVProps = [{node, hd(Nodes)}, MRVProps = [{node, hd(Nodes)},
%% don't need 'path' because riak_test does that for us %% don't need 'path' because riak_test does that for us
{keycount, 1000}, {keycount, 1000},