eliminate TEST_ONLY differentiation

devstack is a development and test environment, but by default we were
only installing the runtime dependencies. We should install all the
testing required packages as well.

Change-Id: I7c95927b9daad15766aac9d1276b10ca62efb24c
diff --git a/files/debs/general b/files/debs/general
index 84d4302..5f10a20 100644
--- a/files/debs/general
+++ b/files/debs/general
@@ -6,7 +6,7 @@
 gcc
 g++
 git
-graphviz # testonly - docs
+graphviz # needed for docs
 lsof # useful when debugging
 openssh-server
 openssl
diff --git a/files/debs/glance b/files/debs/glance
index 9fda6a6..37877a8 100644
--- a/files/debs/glance
+++ b/files/debs/glance
@@ -1,6 +1,6 @@
-libmysqlclient-dev  # testonly
-libpq-dev           # testonly
-libssl-dev          # testonly
+libmysqlclient-dev
+libpq-dev
+libssl-dev
 libxml2-dev
-libxslt1-dev        # testonly
-zlib1g-dev           # testonly
+libxslt1-dev
+zlib1g-dev
diff --git a/files/debs/neutron b/files/debs/neutron
index aa3d709..2d69a71 100644
--- a/files/debs/neutron
+++ b/files/debs/neutron
@@ -1,12 +1,12 @@
-acl     # testonly
+acl
 ebtables
 iptables
 iputils-ping
 iputils-arping
-libmysqlclient-dev  # testonly
+libmysqlclient-dev
 mysql-server #NOPRIME
 sudo
-postgresql-server-dev-all       # testonly
+postgresql-server-dev-all
 python-mysqldb
 python-mysql.connector
 python-qpid # NOPRIME
diff --git a/files/debs/nova b/files/debs/nova
index 0c31385..9d9acde 100644
--- a/files/debs/nova
+++ b/files/debs/nova
@@ -4,7 +4,7 @@
 kpartx
 parted
 iputils-arping
-libmysqlclient-dev  # testonly
+libmysqlclient-dev
 mysql-server # NOPRIME
 python-mysqldb
 python-mysql.connector
diff --git a/files/debs/trove b/files/debs/trove
index 09dcee8..96f8f29 100644
--- a/files/debs/trove
+++ b/files/debs/trove
@@ -1 +1 @@
-libxslt1-dev   # testonly
+libxslt1-dev
diff --git a/files/rpms-suse/general b/files/rpms-suse/general
index 63cf14b..2219426 100644
--- a/files/rpms-suse/general
+++ b/files/rpms-suse/general
@@ -6,7 +6,7 @@
 gcc
 gcc-c++
 git-core
-graphviz # testonly - docs
+graphviz # docs
 iputils
 libopenssl-devel # to rebuild pyOpenSSL if needed
 lsof # useful when debugging
diff --git a/files/rpms-suse/neutron b/files/rpms-suse/neutron
index 66d6e4c..d278363 100644
--- a/files/rpms-suse/neutron
+++ b/files/rpms-suse/neutron
@@ -1,11 +1,11 @@
-acl     # testonly
+acl
 dnsmasq
 dnsmasq-utils # dist:opensuse-12.3,opensuse-13.1
 ebtables
 iptables
 iputils
 mariadb # NOPRIME
-postgresql-devel        # testonly
+postgresql-devel
 python-eventlet
 python-greenlet
 python-iso8601
diff --git a/files/rpms-suse/trove b/files/rpms-suse/trove
index 09dcee8..96f8f29 100644
--- a/files/rpms-suse/trove
+++ b/files/rpms-suse/trove
@@ -1 +1 @@
-libxslt1-dev   # testonly
+libxslt1-dev
diff --git a/files/rpms/general b/files/rpms/general
index eac4ec3..d74ecc6 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -5,7 +5,7 @@
 gcc
 gcc-c++
 git-core
-graphviz # testonly - docs
+graphviz # needed only for docs
 openssh-server
 openssl
 openssl-devel # to rebuild pyOpenSSL if needed
diff --git a/files/rpms/glance b/files/rpms/glance
index 119492a..479194f 100644
--- a/files/rpms/glance
+++ b/files/rpms/glance
@@ -1,6 +1,6 @@
-libxml2-devel       # testonly
-libxslt-devel       # testonly
-mysql-devel         # testonly
-openssl-devel       # testonly
-postgresql-devel    # testonly
-zlib-devel          # testonly
+libxml2-devel
+libxslt-devel
+mysql-devel
+openssl-devel
+postgresql-devel
+zlib-devel
diff --git a/files/rpms/neutron b/files/rpms/neutron
index c0dee78..8292e7b 100644
--- a/files/rpms/neutron
+++ b/files/rpms/neutron
@@ -1,15 +1,15 @@
 MySQL-python
-acl     # testonly
+acl
 dnsmasq # for q-dhcp
 dnsmasq-utils # for dhcp_release
 ebtables
 iptables
 iputils
 mysql-connector-python
-mysql-devel  # testonly
+mysql-devel
 mysql-server # NOPRIME
 openvswitch # NOPRIME
-postgresql-devel        # testonly
+postgresql-devel
 rabbitmq-server # NOPRIME
 qpid-cpp-server        # NOPRIME
 sqlite
diff --git a/files/rpms/nova b/files/rpms/nova
index 527928a..ebd6674 100644
--- a/files/rpms/nova
+++ b/files/rpms/nova
@@ -17,7 +17,7 @@
 numpy # needed by websockify for spice console
 m2crypto
 mysql-connector-python
-mysql-devel  # testonly
+mysql-devel
 mysql-server # NOPRIME
 parted
 polkit
diff --git a/files/rpms/trove b/files/rpms/trove
index c5cbdea..e7bbd43 100644
--- a/files/rpms/trove
+++ b/files/rpms/trove
@@ -1 +1 @@
-libxslt-devel   # testonly
+libxslt-devel
diff --git a/functions-common b/functions-common
index f96da5b..48e400d 100644
--- a/functions-common
+++ b/functions-common
@@ -883,16 +883,6 @@
                 fi
             fi
 
-            # Look for # testonly in comment
-            if [[ $line =~ (.*)#.*testonly.* ]]; then
-                package=${BASH_REMATCH[1]}
-                # Are we installing test packages? (test for the default value)
-                if [[ $INSTALL_TESTONLY_PACKAGES = "False" ]]; then
-                    # If not installing test packages the skip this package
-                    inst_pkg=0
-                fi
-            fi
-
             if [[ $inst_pkg = 1 ]]; then
                 echo $package
             fi
diff --git a/inc/python b/inc/python
index 229c540..2d76081 100644
--- a/inc/python
+++ b/inc/python
@@ -101,18 +101,17 @@
         $cmd_pip install \
         $@
 
-    INSTALL_TESTONLY_PACKAGES=$(trueorfalse False INSTALL_TESTONLY_PACKAGES)
-    if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then
-        local test_req="$@/test-requirements.txt"
-        if [[ -e "$test_req" ]]; then
-            $sudo_pip \
-                http_proxy=${http_proxy:-} \
-                https_proxy=${https_proxy:-} \
-                no_proxy=${no_proxy:-} \
-                PIP_FIND_LINKS=$PIP_FIND_LINKS \
-                $cmd_pip install \
-                -r $test_req
-        fi
+    # Also install test requirements
+    local test_req="$@/test-requirements.txt"
+    if [[ -e "$test_req" ]]; then
+        echo "Installing test-requirements for $test_req"
+        $sudo_pip \
+            http_proxy=${http_proxy:-} \
+            https_proxy=${https_proxy:-} \
+            no_proxy=${no_proxy:-} \
+            PIP_FIND_LINKS=$PIP_FIND_LINKS \
+            $cmd_pip install \
+            -r $test_req
     fi
 }
 
diff --git a/stackrc b/stackrc
index f8d9c43..a13f82a 100644
--- a/stackrc
+++ b/stackrc
@@ -615,9 +615,6 @@
 # Set default screen name
 SCREEN_NAME=${SCREEN_NAME:-stack}
 
-# Do not install packages tagged with 'testonly' by default
-INSTALL_TESTONLY_PACKAGES=${INSTALL_TESTONLY_PACKAGES:-False}
-
 # Undo requirements changes by global requirements
 UNDO_REQUIREMENTS=${UNDO_REQUIREMENTS:-True}