aodh/doc/source/contributing/source.rst
Terri Yu 7cae684abc Corrected path for test requirements in docs
Fixes: bug #1188797

Change-Id: Icb3ec7fe90489cc08b4cf8e7b938240c167604e1
2013-06-10 16:41:32 +00:00

2.5 KiB

Working with the Source

Setting up a Development Sandbox

  1. Set up a server or virtual machine to run OpenStack using devstack.

  2. Clone the ceilometer project to the machine:

    $ cd /opt/stack
    $ git clone https://github.com/openstack/ceilometer.git
    $ cd ./ceilometer
  3. Once this is done, you need to setup the review process:

    $ git remote add gerrit ssh://<username>@review.openstack.org:29418/openstack/ceilometer.git
  4. If you are preparing a patch, create a topic branch and switch to it before making any changes:

    $ git checkout -b TOPIC-BRANCH

Running the Tests

Ceiloemter includes an extensive set of automated unit tests which are run through tox.

  1. Install tox:

    $ sudo pip install tox
  2. Install the test dependencies:

    $ sudo pip install -r /opt/stack/ceilometer/test-requirements.txt
  3. Run the unit and code-style tests:

    $ cd /opt/stack/ceilometer
    $ tox -e py27,pep8

    As tox is a wrapper around nose, it also accepts the same flags as nosetests. See the nose options documentation for details about these additional flags.

    Use a double hyphen to pass options to nose. For example, to set verbose flag and to run only tests under tests/api/v2:

    $ tox -e py27 -- -v api/v2

Code Reviews

Ceilometer uses the OpenStack review process for all code and developer documentation contributions. Code reviews are managed through gerrit.