Clone the ceilometer project to the machine:
$ cd /opt/stack
$ git clone https://git.openstack.org/openstack/ceilometer
$ cd ./ceilometer
Once this is done, you need to setup the review process:
$ git remote add gerrit ssh://<username>@review.openstack.org:29418/openstack/ceilometer.git
If you are preparing a patch, create a topic branch and switch to it before making any changes:
$ git checkout -b TOPIC-BRANCH
Ceilometer includes an extensive set of automated unit tests which are run through tox.
Install tox:
$ sudo pip install tox
Install the test dependencies:
$ sudo pip install -r /opt/stack/ceilometer/test-requirements.txt
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.v2To 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_binFor reference, the debug tox environment implements the instructions here: https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests
See also
Ceilometer uses the OpenStack review process for all code and developer documentation contributions. Code reviews are managed through gerrit.