summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--doc/markdown/dev_guide.md33
-rw-r--r--setup.py18
-rwxr-xr-xtools/functional_tests.sh22
-rw-r--r--tox.ini7
5 files changed, 45 insertions, 36 deletions
diff --git a/.gitignore b/.gitignore
index 7ae4697..b42811a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ test/unit/nosetests.xml
test/unit/coverage.xml
test/unit/cover
build
+*.pyc
diff --git a/doc/markdown/dev_guide.md b/doc/markdown/dev_guide.md
index 688adb6..d4e7157 100644
--- a/doc/markdown/dev_guide.md
+++ b/doc/markdown/dev_guide.md
@@ -12,12 +12,20 @@ changes to Gerrit. Follow the the information given
at [GitHub Generating SSH Keys][] if you need help creating your key.
### Package Requirements
+Type the following to install the required packages:
-#### Fedora 19
-On Fedora 19 systems, type:
+* Ubuntu
~~~
-sudo yum install gcc python-devel python-setuptools libffi-devel git rpm-build
+sudo apt-get -y install gcc python-dev python-setuptools libffi-dev \
+ git xfsprogs memcached
+~~~
+
+* Fedora 19
+
+~~~
+sudo yum install gcc python-devel python-setuptools libffi-devel \
+ git rpm-build xfsprogs memcached
~~~
### Git Setup
@@ -51,7 +59,7 @@ It is recommended to use this tool to upload, modify, and query changes in Gerri
The tool can be installed by running the following command:
~~~
-sudo pip install git-review
+sudo pip install --upgrade git-review
~~~
While many Linux distributions offer a version of `git review`,
@@ -93,7 +101,7 @@ Like OpenStack Swift, Gluster for Swift uses `tox` python virtual
environment for its unit tests. To install `tox` type:
~~~
-pip install tox nose
+sudo pip install --upgrade tox nose
~~~
## Workflow
@@ -136,28 +144,19 @@ tests are available under the `test/unit` directory.
#### Functional Tests
-##### OpenStack Swift Havana Setup
-Currently, Havana OpenStack Swift is still under development. While
-currently there is no official release for Havana Swift, there is a
-yum repo with multiple Havana Swift RPM development releases available.
-Please refer to the following [README][] file for more information.
-
##### Executing the tests
-The automated functional tests only run on RPM based systems
-like Fedora/CentOS, etc. To run the functional tests, the following
-requirements must be met.
+To run the functional tests, the following requirements must be met.
1. `/etc/swift` must not exist.
-1. User needs to have `sudo` access; no password necessary
+1. User needs to have `sudo` access
1. `/mnt/gluster-object/test` and `/mnt/gluster-object/test2` directories
must be created on either an XFS or GlusterFS volume.
-1. glusterfs-openstack-swift RPM must not be installed on the system
Once the requirements have been met, you can now run the full functional
tests using the following command:
~~~
-tools/functional_tests.sh
+tox -e functest
~~~
### Commiting changes
diff --git a/setup.py b/setup.py
index 23dd8d6..0fb757d 100644
--- a/setup.py
+++ b/setup.py
@@ -33,15 +33,21 @@ setup(
packages=find_packages(exclude=['test', 'bin']),
test_suite='nose.collector',
classifiers=[
- 'Development Status :: 4 - Beta',
- 'License :: OSI Approved :: Apache Software License',
- 'Operating System :: POSIX :: Linux',
- 'Programming Language :: Python :: 2.6',
- 'Environment :: No Input/Output (Daemon)',
+ 'Development Status :: 5 - Production/Stable'
+ 'Environment :: OpenStack'
+ 'Intended Audience :: Information Technology'
+ 'Intended Audience :: System Administrators'
+ 'License :: OSI Approved :: Apache Software License'
+ 'Operating System :: POSIX :: Linux'
+ 'Programming Language :: Python'
+ 'Programming Language :: Python :: 2'
+ 'Programming Language :: Python :: 2.6'
+ 'Programming Language :: Python :: 2.7'
],
- install_requires=[], # removed for better compat
+ install_requires=[],
scripts=[
'bin/gluster-swift-gen-builders',
+ 'bin/gluster-swift-print-metadata',
],
entry_points={
'paste.app_factory': [
diff --git a/tools/functional_tests.sh b/tools/functional_tests.sh
index af76831..421188b 100755
--- a/tools/functional_tests.sh
+++ b/tools/functional_tests.sh
@@ -15,13 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Globals
+# This program expects to be run by tox in a virtual python environment
+# so that it does not pollute the host development system
+
+sudo_env()
+{
+ sudo bash -c "PATH=$PATH $*"
+}
cleanup()
{
sudo service memcached stop
- sudo swift-init main stop
- sudo pip uninstall -y gluster-swift
+ sudo_env swift-init main stop
sudo rm -rf /etc/swift > /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
@@ -57,21 +62,14 @@ done
export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf
-# 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
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"
+sudo_env gluster-swift-gen-builders test test2 || fail "Unable to create ring files"
# Start the services
sudo service memcached start || fail "Unable to start memcached"
-sudo swift-init main start || fail "Unable to start swift"
+sudo_env swift-init main start || fail "Unable to start swift"
mkdir functional_tests > /dev/null 2>&1
nosetests -v --exe \
diff --git a/tox.ini b/tox.ini
index 7d0d3be..863ea61 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py26,py27,pep8
+envlist = py26,py27,pep8,functest
[testenv]
setenv = VIRTUAL_ENV={envdir}
@@ -18,6 +18,11 @@ commands = nosetests -v --exe --with-xunit --with-coverage --cover-package glust
[tox:jenkins]
downloadcache = ~/cache/pip
+[testenv:functest]
+changedir = {toxinidir}
+whitelist_externals=bash
+commands = bash tools/functional_tests.sh
+
[testenv:pep8]
changedir = {toxinidir}
commands =