Browse code

USe `trueorfalse` for INSTALL_TESTONLY_PACKAGES

INSTALL_TESTONLY_PACKAGES is assumed to be set to `True` or `False`.
However, in devstack-gate this variable is set to 0 or 1. The patch uses
the already existing `trueorfalse` function to evaluate
INSTALL_TESTONLY_PACKAGES and normalize its value.

Change-Id: I0e4a31e422bad2a31d919d9f871e24833a0faa99

Flavio Percoco authored on 2014/11/01 02:48:00
Showing 1 changed files
... ...
@@ -993,6 +993,8 @@ function get_packages {
993 993
     local file_to_parse
994 994
     local service
995 995
 
996
+    INSTALL_TESTONLY_PACKAGES=$(trueorfalse False $INSTALL_TESTONLY_PACKAGES)
997
+
996 998
     if [[ -z "$package_dir" ]]; then
997 999
         echo "No package directory supplied"
998 1000
         return 1
... ...
@@ -1599,6 +1601,7 @@ function pip_install {
1599 1599
         $cmd_pip install \
1600 1600
         $pip_mirror_opt $@
1601 1601
 
1602
+    INSTALL_TESTONLY_PACKAGES=$(trueorfalse False $INSTALL_TESTONLY_PACKAGES)
1602 1603
     if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then
1603 1604
         local test_req="$@/test-requirements.txt"
1604 1605
         if [[ -e "$test_req" ]]; then