INSTALL_TESTONLY_PACKAGES in devstack only impacts .deb/.rpm files
even though most of our test requirements are actually specified
in python. This will do an explicit install of test-requirements.txt
if pip_install is called with args that look like a directory,
and test-requirements.txt exists in that directory.
Change-Id: Id21e282ddc945c819c9c8c4d724658e28bfde785
| ... | ... |
@@ -1386,6 +1386,19 @@ function pip_install {
|
| 1386 | 1386 |
$cmd_pip install --build=${pip_build_tmp} \
|
| 1387 | 1387 |
$pip_mirror_opt $@ \ |
| 1388 | 1388 |
&& $sudo_pip rm -rf ${pip_build_tmp}
|
| 1389 |
+ |
|
| 1390 |
+ if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then |
|
| 1391 |
+ local test_req="$@/test-requirements.txt" |
|
| 1392 |
+ if [[ -e "$test_req" ]]; then |
|
| 1393 |
+ $sudo_pip PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
|
|
| 1394 |
+ http_proxy=$http_proxy \ |
|
| 1395 |
+ https_proxy=$https_proxy \ |
|
| 1396 |
+ no_proxy=$no_proxy \ |
|
| 1397 |
+ $cmd_pip install --build=${pip_build_tmp} \
|
|
| 1398 |
+ $pip_mirror_opt -r $test_req \ |
|
| 1399 |
+ && $sudo_pip rm -rf ${pip_build_tmp}
|
|
| 1400 |
+ fi |
|
| 1401 |
+ fi |
|
| 1389 | 1402 |
} |
| 1390 | 1403 |
|
| 1391 | 1404 |
# this should be used if you want to install globally, all libraries should |