Monday, July 20, 2009

Launchpad API for PPAs - part 3

Continuing with Launchpad API for PPA, let's illustrate how to copy specific sources from one archive to another.

An authenticated user may copy sources (including their binaries or not) from any public archive to any PPA he has permission to upload using syncSource

One practical example is backporting recent SRUs to LTS series using your PPAs. Let say, we want the latest libvirt version available for testing in your Hardy instance.

ubuntu = lp.distributions['ubuntu']
primary, partner = ubuntu.archives
ppa ='ppa')
source_name='libvirt', version='0.6.1-0ubuntu5.1',
from_archive=primary, include_binaries=False,
to_series='hardy', to_pocket='Release')

libvirt - 0.6.1-0ubuntu5.1 will be rebuilt in your PPA for hardy and if everything is compatible in few minutes you will be able to use and share it with other users.

Tuesday, June 30, 2009

Behavior-driven testing (BDT) support in python

Today Sidnei called my attention to Pyccuracy and Behavior-driven Testing

I decided to give it a try.

Started by repackaging the unofficial ubuntu packages I found in in my PPA (basically, for fun).

There you can find python-pyccuracy and its dependencies (python-pyoc and python-selenium).

Install python-pyccurancy.

$ sudo apt-get install python-pyccuracy

Install the Selenium RC, if you don't have it yet, and run the server.

$ wget
$ unzip
$ java -jar selenium-remote-control-1.0.1/selenium-server-1.0.1/selenium-server.jar

Then you can use pyccuracy_console to run its own test suite which uses BDT.

$ pyccuracy_console -d /usr/share/pyccuracy/tests/acceptance/action_tests/ -p "*en-us.acc"

To be continued ...