Merge "install test-reqs when TESTONLY packages are installed"

This commit is contained in:
Jenkins 2014-09-06 13:28:13 +00:00 committed by Gerrit Code Review
commit 17b6938125

View File

@ -1400,6 +1400,19 @@ function pip_install {
$cmd_pip install --build=${pip_build_tmp} \
$pip_mirror_opt $@ \
&& $sudo_pip rm -rf ${pip_build_tmp}
if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then
local test_req="$@/test-requirements.txt"
if [[ -e "$test_req" ]]; then
$sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
http_proxy=$http_proxy \
https_proxy=$https_proxy \
no_proxy=$no_proxy \
$cmd_pip install --build=${pip_build_tmp} \
$pip_mirror_opt -r $test_req \
&& $sudo_pip rm -rf ${pip_build_tmp}
fi
fi
}
# this should be used if you want to install globally, all libraries should