Files
aodh/doc/source/contributing/source.rst
nellysmitt 5fda6a2efa Edit docs for docs.opentack.org/developer/
Add missed steps in the installation process for running tests.
Mongodb and libmysqlclient-dev packages need to be installed for
Ubuntu12.04 and mongodb and mariadb-devel.x86_64 (or .i386)
need to be installed on Fedora20.

This information has been added to:
doc/source/contriburing/source.rst.

DocImpact
Closes-Bug: #1368974
Change-Id: I163879498b37866c8679b7f69ba60abaacc2e017
2014-10-11 17:12:47 +00:00

3.3 KiB
Raw Blame History

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://git.openstack.org/openstack/ceilometer
    $ 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

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

  1. Install tox:

    $ sudo pip install tox
  2. On Ubuntu install mongodb and libmysqlclient-dev packages:

    $ sudo apt-get install mongodb
    $ sudo apt-get install libmysqlclient-dev

    For Fedora20 there is no libmysqlclient-dev package, so youll need to install mariadb-devel.x86-64 (or mariadb-devel.i386) instead:

    $ sudo yum install mongodb
    $ sudo yum install mariadb-devel.x86_64
  3. Install the test dependencies:

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

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

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

    Use a double hyphen to pass options to testr. For example, to run only tests under tests/api/v2:

    $ tox -e py27 -- api.v2

    To debug tests (ie. break into pdb debugger), you can use ''debug'' tox environment. Here's an example, passing the name of a test since you'll normally only want to run the test that hits your breakpoint:

    $ tox -e debug ceilometer.tests.test_bin

    For reference, the debug tox environment implements the instructions here: https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests

Code Reviews

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