mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
Add more verbose lager messages to the prereq.
This commit is contained in:
parent
13ee1bb0e9
commit
4a4a667824
@ -35,29 +35,36 @@ confirm() ->
|
||||
|
||||
prereqs() ->
|
||||
%% Need python, yo
|
||||
lager:info("[PREREQ] Checking for presence of python"),
|
||||
?assertNot(length(os:cmd("which python")) =:= 0),
|
||||
|
||||
%% Python should be at least 2.6, but not 3.x
|
||||
lager:info("[PREREQ] Checking for python version >= 2.6, < 3.0"),
|
||||
"Python 2." ++ [Minor|_] = os:cmd("python -V"),
|
||||
?assert(Minor =:= $6 orelse Minor =:= $7),
|
||||
|
||||
%% Need setuptools too
|
||||
lager:info("[PREREQ] Checking for presence of setuptools"),
|
||||
?assertCmd("python -c 'import setuptools'"),
|
||||
|
||||
%% Virtualenv will isolate this so we don't have permissions issues.
|
||||
lager:info("[PREREQ] Checking for presence of virtualenv"),
|
||||
?assertCmd("virtualenv --help"),
|
||||
|
||||
%% Checkout the project and a specific tag.
|
||||
lager:info("[PREREQ] Checking for riak-python-client in ~s", [rt:config(rt_scratch_dir)]),
|
||||
case file:read_file_info(?PYTHON_CHECKOUT) of
|
||||
{error, _} ->
|
||||
lager:info("Cloning riak-python-client from ~s", [?PYTHON_GIT_URL]),
|
||||
lager:info("[PREREQ] Cloning riak-python-client from ~s", [?PYTHON_GIT_URL]),
|
||||
Cmd = io_lib:format("git clone ~s ~s", [?PYTHON_GIT_URL, ?PYTHON_CHECKOUT]),
|
||||
rt:stream_cmd(Cmd);
|
||||
_ -> ok
|
||||
end,
|
||||
|
||||
lager:info("[PREREQ] Resetting python client to tag '~s'", [?PYTHON_CLIENT_TAG]),
|
||||
TagCmd = io_lib:format("git reset --hard ~s", [?PYTHON_CLIENT_TAG]),
|
||||
rt:stream_cmd(TagCmd, [{cd, ?PYTHON_CHECKOUT}]),
|
||||
|
||||
lager:info("Installing an isolated environment with virtualenv in ~s", [?PYTHON_CHECKOUT]),
|
||||
lager:info("[PREREQ] Installing an isolated environment with virtualenv in ~s", [?PYTHON_CHECKOUT]),
|
||||
rt:stream_cmd("virtualenv --clear --no-site-packages .", [{cd, ?PYTHON_CHECKOUT}]),
|
||||
ok.
|
||||
|
Loading…
Reference in New Issue
Block a user