summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLuis Pabon <lpabon@redhat.com>2013-09-09 15:29:34 -0400
committerLuis Pabon <lpabon@redhat.com>2013-09-10 11:55:03 -0700
commit3609471ada59d1daca9b06b5b224a19908359973 (patch)
treec5fded905e6ed8a9184d62d1cff0c93e6a2514d5 /tools
parente94cf06f870891177f45b64b32fa3b1050b26f1f (diff)
Tests should depend on PIP instead of Yum
Unit tests now use pip to install the desired version of pip. Functional tests have been changed to use pip instead of yum to install the desired version of pip. Change-Id: I4ccc743385fb4258549c115e575c8834fd4d0561 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5853 Reviewed-by: Peter Portante <pportant@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/functional_tests.sh15
-rw-r--r--tools/test-requires2
2 files changed, 9 insertions, 8 deletions
diff --git a/tools/functional_tests.sh b/tools/functional_tests.sh
index e1be404..af76831 100755
--- a/tools/functional_tests.sh
+++ b/tools/functional_tests.sh
@@ -16,15 +16,13 @@
# limitations under the License.
# Globals
-FUNCTAG=functest.$$
cleanup()
{
sudo service memcached stop
sudo swift-init main stop
- sudo yum -y remove glusterfs-openstack-swift
+ sudo pip uninstall -y gluster-swift
sudo rm -rf /etc/swift > /dev/null 2>&1
- rm -f build/glusterfs-openstack-swift-*${FUNCTAG}*rpm > /dev/null 2>&1
sudo rm -rf /mnt/gluster-object/test{,2}/* > /dev/null 2>&1
sudo setfattr -x user.swift.metadata /mnt/gluster-object/test{,2} > /dev/null 2>&1
}
@@ -59,12 +57,15 @@ done
export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf
-# Create and install the rpm
-PKG_RELEASE=${FUNCTAG} bash makerpm.sh
-sudo yum -y install build/glusterfs-openstack-swift-*${FUNCTAG}*.noarch.rpm || fail "Unable to install rpm"
+# Download and cache swift
+pip install --no-install --download-cache=$HOME/.pipcache swift==1.9.1
+# Install swift
+sudo pip install --download-cache=$HOME/.pipcache swift==1.9.1
+# Install gluster-swift
+sudo pip install -e $PWD
# Install the configuration files
-mkdir /etc/swift > /dev/null 2>&1
+sudo mkdir /etc/swift > /dev/null 2>&1
sudo cp -r test/functional/conf/* /etc/swift || fail "Unable to copy configuration files to /etc/swift"
( cd /etc/swift ; sudo gluster-swift-gen-builders test test2 ) || fail "Unable to create ring files"
diff --git a/tools/test-requires b/tools/test-requires
index e2941a0..0961694 100644
--- a/tools/test-requires
+++ b/tools/test-requires
@@ -1,8 +1,8 @@
# Install bounded pep8/pyflakes first, then let flake8 install
+swift==1.9.1
pep8==1.4.5
pyflakes==0.7.2
flake8==2.0
-
coverage
nose
nosexcover